Monday, July 30, 2012

Linux - ipv6 Commands

To Verify if ipv6 is running
~~~~~~~~~~~~~~~~~~

[kanbaras@adprobot ipv6]$ cat /proc/net/if_inet6
00000000000000000000000000000001 01 80 10 80       lo
fe80000000000000e61f13fffe68411c 03 40 20 80     eth0

To View the ipv6 route
~~~~~~~~~~~~~~~~
netstat -r -6

or

[kanbaras@adprobot ipv6]$ route -A inet6
Kernel IPv6 routing table
Destination                                 Next Hop                                Flags Metric Ref    Use Iface
fe80::/64                                   *                                       U     256    0        0 eth0
localhost6.localdomain6/128                 *                                       U     0      5188       1 lo
fe80::e61f:13ff:fe68:411c/128               *                                       U     0      0        1 lo
ff00::/8                                    *                                       U     256    0        0 eth0

To ipv6 Ping in linux
~~~~~~~~~~~~~~

kanbaras@adprobot ipv6]$ ping6 ::1
PING ::1(::1) 56 data bytes
64 bytes from ::1: icmp_seq=1 ttl=64 time=0.020 ms
64 bytes from ::1: icmp_seq=2 ttl=64 time=0.027 ms
64 bytes from ::1: icmp_seq=3 ttl=64 time=0.016 ms
64 bytes from ::1: icmp_seq=4 ttl=64 time=0.015 ms
64 bytes from ::1: icmp_seq=5 ttl=64 time=0.014 ms
64 bytes from ::1: icmp_seq=6 ttl=64 time=0.015 ms

To Configure a server load balancer
~~~~~~~~~~~~~~~~~~~~~~~~

load balancer like SI-ADX - DUT3
~~~~~~~~~~~~~~~~~~~~~~~
server real rs1 2002::606:601
 port http
 port http url "HEAD /"
 port telnet        
       

server virtual vs1 2002::505:503
 port http
 port telnet
 bind http rs1 http
 bind telnet rs1 telnet

ip route 172.26.50.0 255.255.255.0 172.26.64.1
ip route 10.37.54.0 255.255.255.0 172.26.64.1

interface ethernet 1
 ipv6 address 2002::505:502/120

interface ethernet 16
 ipv6 address 2002::606:602/120

 DUT2
 ~~~~
 172.26.64.250 7011

 int eth 24
 enable


 int eth 2
 enable


 DUT4
 ~~~~
  172.26.64.250 7012

 int eth 23
 enable


 int eth 24
 enable

 PC1
 ~~~
 ifconfig eth1 up
 ifconfig eth1:1 inet6 add 2002::0505:0501/120 up
 route -A inet6 add 2002::0606:0600/120 gw 2002::0505:0502

 PC2
 ~~~~
 ifconfig eth1 up
 ifconfig eth1:1 inet6 add 2002::0606:0601/120 up
 route -A inet6 add 2002::0505:0500/120 gw 2002::0606:0602 dev eth1

 service httpd restart


No comments:

Post a Comment