1 9 3
1 9 4 / 7.1
/ 1 9 5 7.2 % netstat -rn Routing tables Destination Gateway Flags Refcnt Use Interface 127.0.0.1 127.0.0.1 UH 1 132 lo0 172.16.12.0 172.16.12.2 U 26 49041 le0
1 9 6 / % ping -s almond PING almond.nuts.com: 56 data bytes 64 bytes from almond.nuts.com (172.16.12.1): icmp_seq=0. time=11. ms 64 bytes from almond.nuts.com (172.16.12.1): icmp_seq=1. time=10. ms ^C ----almond.nuts.com PING Statistics---- 2 packets transmitted, 2 packets received, 0% packet loss round-trip (ms) min/avg/max = 10/10/11 % ping 207.25.98.2 sendto: Network is unreachable % ping 172.16.1.2 sendto: Network is unreachable
/ 1 9 7 7.3 # route add 207.25.98.0 172.16.12.1 1 add net 207.25.98.0: gateway almond
1 9 8 / # route -n add default 172.16.12.1 1 add net default: gateway 172.16.12.1
/ 1 9 9 % netstat -rn Routing tables Destination Gateway Flags Refcnt Use Interface 127.0.0.1 127.0.0.1 UH 1 132 lo0 default 172.16.12.1 UG 0 0 le0 172.16.12.0 172.16.12.2 U 26 49041 le0
2 0 0 / % ping 207.25.98.2 PING 207.25.98.2: 56 data bytes 64 bytes from ruby.ora.com (207.25.98.2): icmp_seq=0. time=110. ms 64 bytes from ruby.ora.com (207.25.98.2): icmp_seq=1. time=100. ms ^C ----207.25.98.2 PING Statistics---- 2 packets transmitted, 2 packets received, 0% packet loss round-trip (ms) min/avg/max = 100/105/110 % ping 172.16.1.2 PING 172.16.1.2: 56 data bytes ICMP Host redirect from gateway almond.nuts.com (172.16.12.1) to pecan.nuts.com (172.16.12.3) for filbert.nuts.com (172.16.1.2) 64 bytes from filbert.nuts.com (172.16.1.2): icmp_seq=1. time=30. ms ^C ----172.16.1.2 PING Statistics---- 1 packets transmitted, 1 packets received, 0% packet loss round-trip (ms) min/avg/max = 30/30/30 % netstat -nr Routing tables Destination Gateway Flags Refcnt Use Interface 127.0.0.1 127.0.0.1 UH 1 1604 lo0 172.16.12.0 172.16.12.2 U 31 686547 le0 172.16.1.2 172.16.12.3 UGHD 0 514 le0 default 172.16.12.1 UG 3 373964 le0
/ 2 0 1 # route -n add 172.16.1.0 172.16.12.3 1 add net 172.16.1.0: gateway 172.16.12.3 # route -n add 172.16.6.0 172.16.12.3 1 add net 172.16.6.0: gateway 172.16.12.3 # route -n add 172.16.3.0 172.16.12.3 1 add net 172.16.3.0: gateway 172.16.12.3 # route -n add 172.16.9.0 172.16.12.3 1 add net 172.16.9.0: gateway 172.16.12.3 % netstat -rn Routing tables Destination Gateway Flags Refcnt Use Interface 127.0.0.1 127.0.0.1 UH 1 132 lo0 172.16.12.0 172.16.12.2 U 31 686547 le0 172.16.1.2 172.16.12.3 UGHD 1 514 le0 default 172.16.12.1 UG 3 373964 le0 172.16.1.0 172.16.12.3 UG 0 0 le0 172.16.6.0 172.16.12.3 UG 0 0 le0 172.16.3.0 172.16.12.3 UG 0 0 le0 172.16.9.0 172.16.12.3 UG 0 0 le0
2 0 2 / /sbin/route add -net 127.0.0.0 /sbin/route add -net 172.16.5.0 netmask 255.255.255.0 /sbin/route add -net 127.0.0.0 dev lo0
/ 2 0 3 route -n add default 172.16.12.1 1 > /dev/console route -n add 172.16.1.0 172.16.12.3 1 > /dev/console route -n add 172.16.6.0 172.16.12.3 1 > /dev/console route -n add 172.16.3.0 172.16.12.3 1 > /dev/console route -n add 172.16.9.0 172.16.12.3 1 > /dev/console
2 0 4 / 7.4
/ 2 0 5
2 0 6 / # routed net 0.0.0.0 gateway 172.16.12.1 metric 1 active n e t n e t h o s t d e f a u l t g a t e w a y
/ 2 0 7 m e t r i c p a s s i v e a c t i v e p a s s i v e a c t i v e a c t i v e p a s s i v e a c t i c v e
2 0 8 /
/ 2 0 9
2 1 0 /
/ 2 1 1
2 1 2 /
/ 2 1 3
2 1 4 /
/ 2 1 5
2 1 6 /
/ 2 1 7
2 1 8 / 7.5
/ 2 1 9
2 2 0 /
/ 2 2 1
2 2 2 / 7.6
/ 2 2 3
2 2 4 / 7.7 g a t e d
/ 2 2 5
2 2 6 /
/ 2 2 7
2 2 8 / # # enable rip, don't broadcast updates, # listen for RIP-2 updates on the multicast address, # check that the updates are authentic. # rip yes { nobroadcast ; interface 172.16.9.23 version 2 multicast authentication simple "REAL^stuff" ; } ; n o b r o a d c a s t i n t e r f a c e v e r s i o n m u l t i c a s t a u t h e n t i c a t i o n i n t e r f a c e n o b r o a d c a s t n o b r o a d a s t b r o a d c a s t n o b r o a d c a s t i n t e r f a c e R E A L ^ s t u f f s i m p l e m d 5 s i m p l e
/ 2 2 9 # Don't time-out subnet 9 interfaces { interface 172.16.9.1 passive ; } ; # Define the OSPF router id routerid 172.16.1.9 ; # Enable RIP-2; announce OSPF routes to # subnet 9 with a cost of 5. rip yes { broadcast ; defaultmetric 5 ; interface 172.16.9.1 version 2 multicast authentication simple "REAL^stuff" ; } ; # Enable OSPF; subnet 1 is the backbone area; # use password authentication. ospf yes { backbone { authtype simple ; interface 172.16.1.9 { priority 5 ; authkey "It'sREAL" ; } ; } ; } ;
2 3 0 / i n t e r f a c e p a s s i v e interface 172.16.9.1 passive r o u t e r i d defaultmetric d e f a u l t m e t r i c d e f a u l t m e t r i c d e f a u l t m e t r i c ospf yes b a c k b o n e ospf yes b a c k b o n e
/ 2 3 1 authtype simple; s i m p l e n o n e n o n e s i m p l e i n t e r f a c e authkey "It'sREAL" ; priority 5 ; p r i o r i t y # Defines our AS number for BGP autonomoussystem 249; # Defines the OSPF router id routerid 172.16.1.1; # Disable RIP rip no; # Enable BGP bgp yes { preference 50 ; group type external peeras 164 { peer 10.6.0.103 ; peer 10.20.0.72 ; }; }; # Enable OSPF; subnet 1 is the backbone area; # use password authentication. ospf yes { backbone { authtype simple ; interface 172.16.1.1 { priority 10 ; authkey "It'sREAL" ;
2 3 2 / } ; } ; }; # Announce routes learned from OSPF and route # to directly connected network via BGP to AS 164 export proto bgp as 164 { proto direct ; proto ospf ; }; # Announce routes learned via BGP from # AS number 164 to our OSPF area. export proto ospfase type 2 { proto bgp as 164 { all ; }; }; a u t o n o m o u s s y s t e m routerid rip no ; bgp yes preference 50 ;
/ 2 3 3 g r o u p type external p e e r allow ; bgp yes { preference 50 ; group type external peeras 164 { allow ; }; }; proto bgp as 164 proto direct proto ospf
2 3 4 / o s p f a s e type 2 type 2 type 1 proto bgp as 164 a l l o p t i o n s gendefault ; # Announce a default route when peering # with a BGP neighbor. export proto ospfase type 2 { proto default ; };
/ 2 3 5 % gated -c -f test.conf trace.test # cp test.conf /etc/gated.conf+ # gdc checknew configuration file /etc/gated.conf+ checks out okay # gdc newconf # gdc restart gated not currently running gdc: /etc/gated was started
2 3 6 / if [ f /usr/sbin/gated -a -f /etc/gated.conf ]; then /usr/sbin/gated; echo -n 'gated' > /dev/console fi
/ 2 3 7 7.8
2 3 8 /