Monday, August 11, 2008

2) Router Configurations

Please note that some explanations on the router configurations are found at the "Router Configs Explanation" post.

Configuration for R0
!
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R0_AS_200
!
logging buffered 4096 debugging
enable secret christopher
!
ip subnet-zero
!
no ip domain-lookup
!
interface Loopback0
description SIMULATED CUSTOMER LAN
ip address 200.20.20.1 255.255.255.0
!
interface Serial1/0
description CONNECTION TO ISP AS NUMBER 100 (R6_AS_100)
bandwidth 1536
ip address 60.50.10.2 255.255.255.252
encapsulation ppp
serial restart-delay 0
!
interface Serial1/1
description CONNECTION TO ISP AS NUMBER 30 (R1_AS_30)
bandwidth 1536
ip address 12.123.50.2 255.255.255.252
encapsulation ppp
serial restart-delay 0
!
router bgp 200
no synchronization
bgp log-neighbor-changes
network 200.20.20.0
redistribute static
neighbor 12.123.50.1 remote-as 30
neighbor 12.123.50.1 distribute-list AS-PATH-100 out
neighbor 60.50.10.1 remote-as 100
neighbor 60.50.10.1 distribute-list AS-PATH-30-50 out
no auto-summary
!
ip classless
ip route 200.20.30.0 255.255.255.0 Null0
ip route 200.20.40.0 255.255.255.0 Null0
ip route 200.20.50.0 255.255.255.0 Null0
ip route 200.20.60.0 255.255.255.0 Null0
no ip http server
!
ip access-list standard AS-PATH-100
deny 192.168.0.0 0.0.255.255
deny 100.100.0.0 0.0.255.255
permit any
ip access-list standard AS-PATH-30-50
deny 192.168.0.0 0.0.255.255
deny 30.30.0.0 0.0.255.255
deny 50.50.0.0 0.0.255.255
permit any
!
line con 0
exec-timeout 30 0
password christopher
logging synchronous
login
line aux 0
exec-timeout 30 0
password christopher
logging synchronous
login
line vty 0 4
exec-timeout 30 0
password christopher
logging synchronous
login
!
end
!


Configuration for R1
!
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R1_AS_30
!
logging buffered 4096 debugging
enable secret christopher
!
ip subnet-zero
!
no ip domain-lookup
!
interface Loopback0
description FOR IBGP PEERING
ip address 30.30.11.1 255.255.255.0
!
interface FastEthernet0/0
description CONNECTION TO CORE SWITCH
ip address 30.30.10.1 255.255.255.0
duplex auto
speed auto
!
interface Serial1/0
description CONNECTION TO CUSTOMER AS NUMBER 200 (R0_AS_200)
bandwidth 1536
ip address 12.123.50.1 255.255.255.252
encapsulation ppp
serial restart-delay 0
!
router ospf 30
log-adjacency-changes
passive-interface Serial1/0
network 12.123.50.1 0.0.0.0 area 0
network 30.30.10.1 0.0.0.0 area 0
network 30.30.11.1 0.0.0.0 area 0
!
router bgp 30
no synchronization
bgp log-neighbor-changes
redistribute connected route-map CONNECTED
neighbor 12.123.50.2 remote-as 200
neighbor 30.30.12.1 remote-as 30
neighbor 30.30.12.1 update-source Loopback0
neighbor 30.30.12.1 next-hop-self
no auto-summary
!
ip classless
no ip http server
!
ip access-list standard LOOPBACK-IP
permit 30.30.11.0 0.0.0.255
route-map CONNECTED permit 100
match ip address LOOPBACK-IP
!
line con 0
exec-timeout 30 0
password christopher
logging synchronous
login
line aux 0
exec-timeout 30 0
password christopher
logging synchronous
login
line vty 0 4
exec-timeout 30 0
password christopher
logging synchronous
login
!
end


Configuration for R2
!
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R2_AS_30
!
logging buffered 4096 debugging
enable secret christopher
!
ip subnet-zero
!
no ip domain-lookup
!
interface Loopback0
description FOR IBGP PEERING
ip address 30.30.12.1 255.255.255.0
!
interface FastEthernet0/0
description CONNECTION TO CORE SWITCH
ip address 30.30.10.2 255.255.255.0
duplex auto
speed auto
!
interface Serial1/0
description CONNECTION TO ANOTHER ISP AS NUMBER 50 (R3_AS_50)
bandwidth 1536
ip address 12.123.50.5 255.255.255.252
encapsulation ppp
serial restart-delay 0
!
router ospf 30
log-adjacency-changes
passive-interface Serial1/0
network 12.123.50.5 0.0.0.0 area 0
network 30.30.10.2 0.0.0.0 area 0
network 30.30.12.1 0.0.0.0 area 0
!
router bgp 30
no synchronization
bgp log-neighbor-changes
redistribute connected route-map CONNECTED
neighbor 12.123.50.6 remote-as 50
neighbor 30.30.11.1 remote-as 30
neighbor 30.30.11.1 update-source Loopback0
neighbor 30.30.11.1 next-hop-self
no auto-summary
!
ip classless
no ip http server
!
ip access-list standard LOOPBACK-IP
permit 30.30.12.0 0.0.0.255
route-map CONNECTED permit 100
match ip address LOOPBACK-IP
!
line con 0
exec-timeout 30 0
password christopher
logging synchronous
login
line aux 0
exec-timeout 30 0
password christopher
logging synchronous
login
line vty 0 4
exec-timeout 30 0
password christopher
logging synchronous
login
!
end


Configuration for R3
!
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R3_AS_50
!
logging buffered 4096 debugging
enable secret christopher
!
ip subnet-zero
!
no ip domain-lookup
!
interface Loopback0
description FOR IBGP PEERING
ip address 50.50.12.1 255.255.255.0
!
interface FastEthernet0/0
description CONNECTION TO CORE SWITCH
ip address 50.50.10.1 255.255.255.0
duplex auto
speed auto
!
interface Serial1/0
description CONNECTION TO ANOTHER ISP AS NUMBER 30 (R2_AS_30)
bandwidth 1536
ip address 12.123.50.6 255.255.255.252
encapsulation ppp
serial restart-delay 0
!
router ospf 50
log-adjacency-changes
passive-interface Serial1/0
network 12.123.50.6 0.0.0.0 area 0
network 50.50.10.1 0.0.0.0 area 0
network 50.50.12.1 0.0.0.0 area 0
!
router bgp 50
no synchronization
bgp log-neighbor-changes
redistribute connected route-map CONNECTED
neighbor 12.123.50.5 remote-as 30
neighbor 50.50.11.1 remote-as 50
neighbor 50.50.11.1 update-source Loopback0
neighbor 50.50.11.1 next-hop-self
no auto-summary
!
ip classless
no ip http server
!
ip access-list standard LOOPBACK-IP
permit 50.50.12.0 0.0.0.255
route-map CONNECTED permit 100
match ip address LOOPBACK-IP
!
line con 0
exec-timeout 30 0
password christopher
logging synchronous
login
line aux 0
exec-timeout 30 0
password christopher
logging synchronous
login
line vty 0 4
exec-timeout 30 0
password christopher
logging synchronous
login
!
end


Configuration for R4
!
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R4_AS_50
!
logging buffered 4096 debugging
enable secret christopher
!
ip subnet-zero
!
no ip domain-lookup
!
interface Loopback0
description FOR IBGP PEERING
ip address 50.50.11.1 255.255.255.0
!
interface FastEthernet0/0
description CONNECTION TO CORE SWITCH
ip address 50.50.10.2 255.255.255.0
duplex auto
speed auto
!
interface Serial1/0
description CONNECTION CUSTOMER AS NUMBER 192 (R5_AS_192)
bandwidth 1536
ip address 50.50.13.1 255.255.255.252
encapsulation ppp
serial restart-delay 0
!
router ospf 50
log-adjacency-changes
passive-interface Serial1/0
network 50.50.10.2 0.0.0.0 area 0
network 50.50.11.1 0.0.0.0 area 0
network 50.50.13.1 0.0.0.0 area 0
!
router bgp 50
no synchronization
bgp log-neighbor-changes
redistribute connected route-map CONNECTED
neighbor 50.50.12.1 remote-as 50
neighbor 50.50.12.1 update-source Loopback0
neighbor 50.50.12.1 next-hop-self
neighbor 50.50.13.2 remote-as 192
no auto-summary
!
ip classless
no ip http server
!
ip access-list standard LOOPBACK-IP
permit 50.50.11.0 0.0.0.255
route-map CONNECTED permit 100
match ip address LOOPBACK-IP
!
line con 0
exec-timeout 30 0
password christopher
logging synchronous
login
line aux 0
exec-timeout 30 0
password christopher
logging synchronous
login
line vty 0 4
exec-timeout 30 0
password christopher
logging synchronous
login
!
end


Configuration for R5
!
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R5_AS_192
!
logging buffered 4096 debugging
enable secret christopher
!
ip subnet-zero
!
no ip domain-lookup
!
interface Loopback0
description SIMULATED CUSTOMER LAN
ip address 192.168.10.1 255.255.255.0
!
interface Serial1/0
description CONNECTION TO ISP AS NUMBER 50 (R4_AS_50)
ip address 50.50.13.2 255.255.255.252
encapsulation ppp
serial restart-delay 0
!
interface Serial1/1
description CONNECTION TO ISP AS NUMBER 100 (R6_AS_100)
ip address 60.50.10.6 255.255.255.252
encapsulation ppp
serial restart-delay 0
!
router bgp 192
no synchronization
bgp log-neighbor-changes
network 192.168.10.0
redistribute static
neighbor 50.50.13.1 remote-as 50
neighbor 50.50.13.1 distribute-list AS-PATH-100 out
neighbor 60.50.10.5 remote-as 100
neighbor 60.50.10.5 distribute-list AS-PATH-30-50 out
no auto-summary
!
ip classless
ip route 192.168.20.0 255.255.255.0 Null0
ip route 192.168.30.0 255.255.255.0 Null0
ip route 192.168.40.0 255.255.255.0 Null0
ip route 192.168.50.0 255.255.255.0 Null0
no ip http server
!
ip access-list standard AS-PATH-100
deny 200.20.0.0 0.0.255.255
deny 100.100.0.0 0.0.255.255
permit any
ip access-list standard AS-PATH-30-50
deny 200.20.0.0 0.0.255.255
deny 30.30.0.0 0.0.255.255
deny 50.50.0.0 0.0.255.255
permit any
!
line con 0
exec-timeout 30 0
password christopher
logging synchronous
login
line aux 0
exec-timeout 30 0
password christopher
logging synchronous
login
line vty 0 4
exec-timeout 30 0
password christopher
logging synchronous
login
!
end


Configuration for R6
!
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R6_AS_100
!
logging buffered 4096 debugging
enable secret christopher
!
ip subnet-zero
!
no ip domain-lookup
!
interface Loopback0
description FOR IBGP PEERING
ip address 100.100.11.1 255.255.255.0
!
interface FastEthernet0/0
description CONNECTION TO CORE SWITCH
ip address 100.100.10.1 255.255.255.0
duplex auto
speed auto
!
interface Serial1/0
description CONNECTION CUSTOMER AS NUMBER 200 (R0_AS_200)
bandwidth 1536
ip address 60.50.10.1 255.255.255.252
encapsulation ppp
serial restart-delay 0
!
router ospf 100
log-adjacency-changes
passive-interface Serial1/0
network 60.50.10.1 0.0.0.0 area 0
network 100.100.10.1 0.0.0.0 area 0
network 100.100.11.1 0.0.0.0 area 0
!
router bgp 100
no synchronization
bgp log-neighbor-changes
redistribute connected route-map CONNECTED
neighbor 60.50.10.2 remote-as 200
neighbor 100.100.12.1 remote-as 100
neighbor 100.100.12.1 update-source Loopback0
neighbor 100.100.12.1 next-hop-self
no auto-summary
!
ip classless
no ip http server
!
ip access-list standard LOOPBACK-IP
permit 100.100.11.0 0.0.0.255
route-map CONNECTED permit 100
match ip address LOOPBACK-IP
!
line con 0
exec-timeout 30 0
password christopher
logging synchronous
login
line aux 0
exec-timeout 30 0
password christopher
logging synchronous
login
line vty 0 4
exec-timeout 30 0
password christopher
logging synchronous
login
!
end


Configuration for R7
!
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R7_AS_100
!
logging buffered 4096 debugging
enable secret christopher
!
ip subnet-zero
!
no ip domain-lookup
!
interface Loopback0
description FOR IBGP PEERING
ip address 100.100.12.1 255.255.255.0
!
interface FastEthernet0/0
description CONNECTION TO CORE SWITCH
ip address 100.100.10.2 255.255.255.0
duplex auto
speed auto
!
interface Serial1/0
description CONNECTION TO CUSTOMER AS NUMBER 192 (R5_AS_192)
bandwidth 1536
ip address 60.50.10.5 255.255.255.252
encapsulation ppp
serial restart-delay 0
!
router ospf 100
log-adjacency-changes
passive-interface Serial1/0
network 60.50.10.5 0.0.0.0 area 0
network 100.100.10.2 0.0.0.0 area 0
network 100.100.12.1 0.0.0.0 area 0
!
router bgp 100
no synchronization
bgp log-neighbor-changes
redistribute connected route-map CONNECTED
neighbor 60.50.10.6 remote-as 192
neighbor 100.100.11.1 remote-as 100
neighbor 100.100.11.1 update-source Loopback0
neighbor 100.100.11.1 next-hop-self
no auto-summary
!
ip classless
no ip http server
!
ip access-list standard LOOPBACK-IP
permit 100.100.12.0 0.0.0.255
route-map CONNECTED permit 20
match ip address LOOPBACK-IP
!
line con 0
exec-timeout 30 0
password christopher
logging synchronous
login
line aux 0
exec-timeout 30 0
password christopher
logging synchronous
login
line vty 0 4
exec-timeout 30 0
password christopher
logging synchronous
login
!
end

*** Router configurations are explained in my next post

3 comments:

  1. I have followed your configuration but i have some problem. Why I can ping from R1 to Loopback 0

    ReplyDelete
  2. I have followed your configuration but i have some problem. Why I can't ping from R1 to Loopback0 R0?

    ReplyDelete

Custom Search