|
Uyarı | |
---|---|
Farklı kablosuz ağların farklı ESSID'leri olacağını da unutmayın!
|
# iwconfig eth0 mode ad-hoc essid homenet enc off # ifconfig eth0 inet6 add fec0:106:2700::4/64 # echo "0" > /proc/sys/net/ipv6/conf/eth0/forwarding # echo "1" > /proc/sys/net/ipv6/conf/eth0/autoconf # echo "1" > /proc/sys/net/ipv6/conf/eth0/accept_ra # echo "1" > /proc/sys/net/ipv6/conf/eth0/accept_redirects # /etc/init.d/mobile-ip6 start
Not | |
---|---|
Bir öntanımlı rota (route) eklemelisiniz, aksi halde HA ziyaret edilen yerel ağdaki MN ile bağlantı sorunu yaşar. Mümkün olan çözümlerden biri HA'nın ev ağında öntanımlı yönlendirici olarak kullanılmasıdır. |
# iwconfig eth0 mode ad-hoc essid homenet enc off # ifconfig eth0 inet6 add fec0:106:2700::2/64 # echo "1" > /proc/sys/net/ipv6/conf/eth0/forwarding # echo "0" > /proc/sys/net/ipv6/conf/eth0/autoconf # echo "0" > /proc/sys/net/ipv6/conf/eth0/accept_ra # echo "0" > /proc/sys/net/ipv6/conf/eth0/accept_redirects # ip route add ::/0 via fec0:106:2700::1 # /etc/init.d/mobile-ip6 start
# ifconfig eth0 inet6 add fec0:106:2300::2/64 # iwconfig eth1 mode ad-hoc essid homenet enc off # ifconfig eth1 inet6 add fec0:106:2700::1/64 # echo "1" > /proc/sys/net/ipv6/conf/all/forwarding # echo "0" > /proc/sys/net/ipv6/conf/all/autoconf # echo "0" > /proc/sys/net/ipv6/conf/all/accept_ra # echo "0" > /proc/sys/net/ipv6/conf/all/accept_redirects # ip route add fec0:106:1100::/64 via fec0:106:2300::1
# ifconfig eth0 inet6 add fec0:106:2300::1/64 # iwconfig eth1 mode ad-hoc essid visitnet enc off # ifconfig eth1 inet6 add fec0:106:1100::1/64 # echo "1" > /proc/sys/net/ipv6/conf/all/forwarding # echo "0" > /proc/sys/net/ipv6/conf/all/autoconf # echo "0" > /proc/sys/net/ipv6/conf/all/accept_ra # echo "0" > /proc/sys/net/ipv6/conf/all/accept_redirects # ip route add fec0:106:2700::/64 via fec0:106:2300::2
Not | |
---|---|
Deneme ortamımızda statik rotalar oluşturduğumuz için her konaktan diğerlerini pingleyebilmeniz gerekir. |
# cat /etc/network-mip6.conf # Home Agent configuration file FUNCTIONALITY=ha DEBUGLEVEL=1 MIN_TUNNEL_NR=1 MAX_TUNNEL_NR=5 TUNNEL_SITELOCAL=yes
# cat /etc/network-mip6.conf # Mobile Node configuration file FUNCTIONALITY=mn DEBUGLEVEL=1 TUNNEL_SITELOCAL=yes MIN_TUNNEL_NR=1 MAX_TUNNEL_NR=3 HOMEDEV=mip6mnha1 HOMEADDRESS=fec0:106:2700::4/64 # MN's home adress HOMEAGENT=fec0:106:2700::2/64 # HA's address
# /etc/init.d/mobile-ip6 start Starting Mobile IPv6: OK
# ifconfig eth1 Link encap:Ethernet HWaddr 00:02:2D:2D:DE:79 inet6 addr: fec0:106:2700::2/64 Scope:Site inet6 addr: fe80::202:2dff:fe2d:de79/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:618 errors:6 dropped:6 overruns:0 frame:6 TX packets:1485 errors:22 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:100 RX bytes:87914 (85.8 KiB) TX bytes:252596 (246.6 KiB) Interrupt:3 Base address:0x100 ip6tnl1 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 UP POINTOPOINT RUNNING NOARP MTU:1460 Metric:1 RX packets:6 errors:0 dropped:0 overruns:0 frame:0 TX packets:6 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:576 (576.0 b) TX bytes:624 (624.0 b) ip6tnl2 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 UP RUNNING NOARP MTU:1460 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:8 errors:0 dropped:0 overruns:0 frame:0 TX packets:8 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:560 (560.0 b) TX bytes:560 (560.0 b)
# lsmod Module Size Used by Not tainted mip6_mn 59888 0 (unused) ipv6_tunnel 11448 1 [mip6_mn] mip6_base 40728 0 [mip6_mn] ipv6 179764 -1 [mip6_mn ipv6_tunnel mip6_base] ...
# cat /etc/radvd.conf interface eth1 { AdvSendAdvert on; AdvIntervalOpt on; MinRtrAdvInterval 3; MaxRtrAdvInterval 10; AdvHomeAgentFlag off; prefix fec0:106:1100::/64 { AdvOnLink on; AdvAutonomous on; AdvRouterAddr on; }; };
# /etc/init.d/radvd start
# radvdump Router advertisement from fe80::202:2dff:fe54:d1b2 (hoplimit 255) Received by interface eth1 # Note: {Min,Max}RtrAdvInterval cannot be obtained with radvdump AdvCurHopLimit: 64 AdvManagedFlag: off AdvOtherConfigFlag: off AdvHomeAgentFlag: off AdvReachableTime: 0 AdvRetransTimer: 0 Prefix fec0:106:1100::/64 AdvValidLifetime: 2592000 AdvPreferredLifetime: 604800 AdvOnLink: on AdvAutonomous: on AdvRouterAddr: off AdvSourceLLAddress: 00 02 2D 54 D1 B2
Not | |
---|---|
HA üzerinde radvd kullanır ve autoconf'u (proc içinde) yetkilendirirseniz statik adresinizin yanı sıra MN üzerinde otomatik oluşturulan (gereksiz) bir IPv6 adresiniz daha olacaktır. |
# cat /etc/radvd.conf interface eth0 { AdvSendAdvert on; MaxRtrAdvInterval 3; MinRtrAdvInterval 1; AdvIntervalOpt off; AdvHomeAgentFlag on; HomeAgentLifetime 10000; HomeAgentPreference 20; AdvHomeAgentInfo on; prefix fec0:106:2700::2/64 { AdvRouterAddr on; AdvOnLink on; AdvAutonomous on; AdvPreferredLifetime 10000; AdvValidLifetime 12000; }; };
# radvdump Router advertisement from fe80::202:2dff:fe54:d11e (hoplimit 255) Received by interface eth0 # Note: {Min,Max}RtrAdvInterval cannot be obtained with radvdump AdvCurHopLimit: 64 AdvManagedFlag: off AdvOtherConfigFlag: off AdvHomeAgentFlag: on AdvReachableTime: 0 AdvRetransTimer: 0 Prefix fec0:106:2700::2/64 AdvValidLifetime: 12000 AdvPreferredLifetime: 10000 AdvOnLink: on AdvAutonomous: on AdvRouterAddr: on AdvSourceLLAddress: 00 02 2D 54 D1 1E AdvHomeAgentInfo: HomeAgentPreference: 20 HomeAgentLifetime: 1000 # # ifconfig eth0 eth0 Link encap:Ethernet HWaddr 00:90:7D:F3:03:1A inet6 addr: fec0:106:2700:0:290:7dff:fef3:31a/64 Scope:Site inet6 addr: fec0:106:2700::4/64 Scope:Site inet6 addr: fe80::290:7dff:fef3:31a/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:513 errors:89 dropped:89 overruns:0 frame:85 TX packets:140 errors:41 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:100 RX bytes:56084 (54.7 Kb) TX bytes:19212 (18.7 Kb) Interrupt:3 Base address:0x100
|