[Internet-e-architetture-di-rete] routing statico e dinamico
Mauro Angiolillo
m.angiolillo at comuneap.gov.it
Sat Apr 23 15:49:49 CEST 2016
Salve prof,
di seguito riporto gli istradamenti di uno dei dispositivi di casa:
(legenda: 192.168.0.10/24 - gulliver
192.168.0.254/24 - gateway
)
[15:31:15 root at gulliver:~] ifconfig
eth0 Link encap:Ethernet HWaddr 00:e0:6f:28:30:aa
inet addr:192.168.0.10 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: 2001:b07:2ec:6f88:2e0:6fff:fe28:30aa/64 Scope:Global
inet6 addr: fe80::2e0:6fff:fe28:30aa/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:212029640 errors:0 dropped:0 overruns:0 frame:0
TX packets:93016058 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:161016754375 (149.9 GiB) TX bytes:76428812835 (71.1 GiB)
Interrupt:19 Memory:f0400000-f0420000
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:65536 Metric:1
RX packets:250100 errors:0 dropped:0 overruns:0 frame:0
TX packets:250100 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:23652964 (22.5 MiB) TX bytes:23652964 (22.5 MiB)
tun0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:192.168.250.81 P-t-P:192.168.250.82 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:15223222 errors:0 dropped:0 overruns:0 frame:0
TX packets:8091545 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:19289786368 (17.9 GiB) TX bytes:443135866 (422.6 MiB)
[15:32:05 root at gulliver:~] netstat -rn46
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
0.0.0.0 192.168.0.254 0.0.0.0 UG 0 0 0 eth0
172.16.0.0 192.168.250.82 255.255.0.0 UG 0 0 0 tun0
172.31.0.0 192.168.250.82 255.255.0.0 UG 0 0 0 tun0
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
192.168.1.0 192.168.250.82 255.255.255.0 UG 0 0 0 tun0
192.168.2.0 192.168.250.82 255.255.255.0 UG 0 0 0 tun0
192.168.200.0 192.168.250.82 255.255.255.0 UG 0 0 0 tun0
192.168.250.1 192.168.250.82 255.255.255.255 UGH 0 0 0 tun0
192.168.250.82 0.0.0.0 255.255.255.255 UH 0 0 0 tun0
Kernel IPv6 routing table
Destination Next Hop Flag Met Ref Use If
::1/128 :: U 256 0 0 lo
2001:b07:2ec:6f88::/64 :: UAe 256 2 10830 eth0
fe80::/64 :: U 256 2 4 eth0
::/0 fe80::c6ea:1dff:fe4d:dc26 UGDAe 1024 2 20697 eth0
::/0 :: !n -1 1 31543 lo
::1/128 :: Un 0 3 5775 lo
2001:b07:2ec:6f88:2e0:6fff:fe28:30aa/128 :: Un 0 3364710 lo
fe80::2e0:6fff:fe28:30aa/128 :: Un 0 3 64942 lo
ff00::/8 :: U 256 2 32108 eth0
::/0 :: !n -1 1 31543 lo
Gli instradamenti statici (ipv4)sono impostati su una vpn (openvpn) per raggiungere le reti
a valle del tunnel.
Sul gateway di casa (router adsl), ho impostato le seguenti route (per poter raggiungere le reti
dietro la vpn da qualsiasi altro host di casa):
{gandalf}=>ip rtlist
Label Destination Interface Admin Oper Mtr Gateway
----- ----------- --------- ----- ---- --- -------
[ ... instradamenti pubblici per la connettività voce e adsl... ]
192.168.0.0/24 LocalNetwork UP [UP] 0
192.168.1.0/24 LocalNetwork UP [UP] 0 192.168.0.10
192.168.2.0/24 LocalNetwork UP [UP] 0 192.168.0.10
192.168.200.0/24 LocalNetwork UP [UP] 0 192.168.0.10
172.16.0.0/16 LocalNetwork UP [UP] 0 192.168.0.10
172.31.0.0/16 LocalNetwork UP [UP] 0 192.168.0.10
0.0.0.0/0 ipWANData_ADSL UP UP 0 x.x.x.x [ ip pubblico del router adsl ]
Mauro
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 203 bytes
Desc: OpenPGP digital signature
URL: <http://list.informagiovani.comunesbt.it/pipermail/internet-e-architetture-di-rete/attachments/20160423/a120f5ed/attachment.bin>
More information about the Internet-e-architetture-di-rete
mailing list