-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathip
69 lines (50 loc) · 1.7 KB
/
ip
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# Display all interfaces with addresses
ip addr
# Take down / up the wireless adapter
ip link set dev wlan0 {up|down}
# Set a static IP and netmask
ip addr add 192.168.1.100/32 dev eth0
# Remove a IP from an interface
ip addr del 192.168.1.100/32 dev eth0
# Remove all IPs from an interface
ip address flush dev eth0
# Display all routes
ip route
# Display all routes for IPv6
ip -6 route
# Add default route via gateway IP
ip route add default via 192.168.1.1
# Add route via interface
ip route add 192.168.0.0/24 dev eth0
# Change your mac address
ip link set dev eth0 address aa:bb:cc:dd:ee:ff
# View neighbors (using ARP and NDP)
ip neighbor show
# Get only address of interface edge0
ip -o a show dev eth0 | awk '{print $4}' | awk -F\/ '{print $1}'
#VXLAN
[root@vi-cangenepoc-vcog1 sbirukov]#:
modprobe vxlan
ip l add name vxlan3 type vxlan id 45 dstport 4789
bridge fdb append to 00:00:00:00:00:00 dst 172.31.254.106 dev vxlan3
bridge fdb append to 00:00:00:00:00:00 dst 172.31.254.41 dev vxlan3
ip a add 192.168.0.3/24 dev vxlan3
ip l set up dev vxlan3
[root@vi-cangenepoc-vflex1 sbirukov]#:
modprobe vxlan
ip l add name vxlan3 type vxlan id 45 dstport 4789
bridge fdb append to 00:00:00:00:00:00 dst 172.31.254.102 dev vxlan3
bridge fdb append to 00:00:00:00:00:00 dst 172.31.254.41 dev vxlan3
ip a add 192.168.0.1/24 dev vxlan3
ip l set up dev vxlan3
[root@vi-flexpoc-admin1 sbirukov]#
modprobe vxlan
ip l add name vxlan3 type vxlan id 45 dstport 4789
bridge fdb append to 00:00:00:00:00:00 dst 172.31.254.102 dev vxlan3
bridge fdb append to 00:00:00:00:00:00 dst 172.31.254.106 dev vxlan3
ip a add 192.168.0.2/24 dev vxlan3
ip l set up dev vx
lan3
ip l set down dev vxlan3
ip l del dev vxlan3
rmmod vxlan