BGP跨區+EIGRP內部路由 + Router作DHCP server
A ip dhcp excluded-address 192.168.0.1 # 保留DHCP的IP 192.168.0.1不派出去 ! ip dhcp pool A network 192.168.0.0 255.255.255.0 #DHCP派出去的IP範圍 default-router 192.168.0.1 #預設DHCO Gateway ! interface FastEthernet0/0 ip address 192.168.0.1 255.255.255.0 ! interface Serial1/0 ip address 1.1.1.2 255.255.255.252 ! router bgp 65001 no synchronization network 192.168.0.0 neighbor 1.1.1.1 remote-as 65003 #連結另一個AS 65003 ! |
ISP1 ! interface Serial1/0 ip address 1.1.1.1 255.255.255.252 ! interface Serial1/1 ip address 1.1.1.5 255.255.255.252 ! router eigrp 100 redistribute static # 將靜態路由redistribute to EIGRP redistribute bgp 65003 metric 100 1 255 1 1500 # 將BGP 65003 redistribute to EIGRP network 1.1.1.0 0.0.0.3 network 1.1.1.4 0.0.0.3 network 1.1.1.8 0.0.0.3 ! router bgp 65003 no synchronization network 1.1.1.0 mask 255.255.255.252 network 1.1.1.4 mask 255.255.255.252 network 1.1.1.8 mask 255.255.255.252 redistribute connected redistribute static redistribute eigrp 100 neighbor 1.1.1.2 remote-as 65001 neighbor 1.1.1.6 remote-as 65003 ! |
ISP2 ! interface Serial1/0 ip address 1.1.1.9 255.255.255.252 ! interface Serial1/1 ip address 1.1.1.6 255.255.255.252 ! router eigrp 100 redistribute static redistribute bgp 65003 metric 100 1 255 1 1500 network 1.1.1.0 0.0.0.3 network 1.1.1.4 0.0.0.3 network 1.1.1.8 0.0.0.3 ! router bgp 65003 no synchronization network 1.1.1.0 mask 255.255.255.252 network 1.1.1.4 mask 255.255.255.252 network 1.1.1.8 mask 255.255.255.252 redistribute connected redistribute static redistribute eigrp 100 neighbor 1.1.1.10 remote-as 65002 neighbor 1.1.1.5 remote-as 65003 |
B interface FastEthernet0/1 ip address 172.16.10.1 255.255.255.0 ! interface Serial1/0 ip address 1.1.1.10 255.255.255.252 ! router bgp 65002 no synchronization bgp log-neighbor-changes network 172.16.10.0 mask 255.255.255.0 neighbor 1.1.1.9 remote-as 65003 ! |
L3 Switch 替代DHCP Server
Multilayer Switch2 ip dhcp excluded-address 192.168.0.1 ! ip dhcp pool 1 network 192.168.0.0 255.255.255.0 default-router 192.168.0.1 ! ip routing ! interface Vlan1 ip address 192.168.0.1 255.255.255.0 ! |