Thursday, September 3, 2015

RHEL 7 CMDS

How to configure VLAN -
=====================
ip link add link ens4 name ens4.23 type vlan id 23
ip link set ens4.23 up
ip addr add 102.23.23.74/24 dev ens4.23
How to bring link up/down -
=========================
ip link set ens4 up
ip link set ens4 down
How to assign IP -
================
ip addr add 102.1.1.74/24 dev ens4
How to assign default gw -
========================
ip route add default via 10.192.192.1
How to change MTU -
=================
ip link set mtu 9000 dev ens4


IPV6:
-----
IPV6:
-----
Add:
ifconfig eth0 inet6 add 2000::31/64
ip -6 addr add 2000::31/64 dev eth0

Display:
ip -6 addr show dev eth0
ifconfig eth0 | grep "inet6 addr:"

Remove:
ip -6 addr del 2000::31/64 dev eth0
ifconfig eth0 inet6 del 2000::31/64

check routing table:
route -n -A inet6

[root@t6vnic1 ~]# route -n -A inet6
Kernel IPv6 routing table
Destination                                 Next Hop                                Flags Metric Ref    Use Iface
2000::/64                                   ::                                      U     256    0        0 eth5
fe80::/64                                   ::                                      U     256    0        0 eth3
fe80::/64                                   ::                                      U     256    0        0 eth5
::1/128                                     ::                                      U     0      5        1 lo
2000::31/128                                ::                                      U     0      1849       1 lo
fe80::211:22ff:fe33:ab56/128                ::                                      U     0      0        1 lo
fe80::444:abff:fecd:0/128                   ::                                      U     0      30       1 lo
ff00::/8                                    ::                                      U     256    0        0 eth3
ff00::/8                                    ::                                      U     256    0        0 eth5



[root@t6fpga5 ~]# cat /proc/net/if_inet6
00000000000000000000000000000001 01 80 10 80       lo
fe80000000000000022590fffeadddde 0e 40 20 80      br0
fe80000000000000022590fffeadddde 02 40 20 80     eth8
fe800000000000000444abfffecd0000 11 40 20 c8     eth2
fe800000000000003c0918fffe07592c 0c 40 20 80     tap3
fe80000000000000904021fffee7e2cb 0d 40 20 80     tap4
20000000000000000000000000000031 11 40 00 c8     eth2

[root@t6vnic1 ~]# ip -6 neigh show
fe80::207:43ff:fe12:4e50 dev eth5 lladdr 00:07:43:12:4e:50 STALE

2000::12 dev eth5 lladdr 00:07:43:12:4e:50 REACHABLE

sysctl -w net.ipv6.conf.all.accept_dad=0
sysctl -w net.ipv6.conf.eth2.accept_dad=0


then only assign ip and bring up the interface.

No comments: