R1#configure terminal | Enter configure mode. |
R1(config)#interface xe51 | Enter interface mode. |
R1(config-if)#ip address 20.1.1.1/24 | Configure the IP address of the interface. |
R1(config-if)#commit | Commit the candidate configuration to the running configuration |
R1(config-if)#exit | Exit interface mode. |
R1(config)#ip prefix-list PF1 | Configure IP prefix-list PF1 |
R1(config-ip-prefix-list)#seq 5 permit 10.1.0.0/16 le 32 | Create an access rule to permit IP packets with Maximum prefix length match |
R1(config-ip-prefix-list)#seq 10 permit 10.1.1.0/24 le 32 | Create an access rule to permit IP packets with Maximum prefix length match |
R1(config-ip-prefix-list)#seq 15 permit 10.1.2.0/24 le 32 | Create an access rule to permit IP packets with Maximum prefix length match |
R1(config-ip-prefix-list)#seq 20 permit 10.1.3.0/24 le 32 | Create an access rule to permit IP packets with Maximum prefix length match |
R1(config-if)#commit | Commit the candidate configuration to the running configuration |
R1(config-if)#exit | Exit interface mode. |
R1(config)#router bgp 100 | Configure bgp process 100 |
R1(config-router)#bgp router-id 1.1.1.1 | Configure bgp router id |
R1(config-router)#neighbor 20.1.1.2 remote-as 100 | Configure bgp remote-as 100 with neighbor IP |
R1(config-router)#neighbor 20.1.1.2 route-map myid1 in | Configure bgp route-map myid1 as In bound policy with neighbor ip |
R1(config-if)#commit | Commit the candidate configuration to the running configuration |
R1(config-routed)#exit | Exit the router bgp mode |
R1(config)#route-map myid1 permit 1 | Configure route-map myid1 with sequence number 1 |
R1(config-route-map)match ip address prefix-list PF1 | Match for prefix PF1 |
R1(config-route-map)continue | Configure continue command without sequence number |
R1(config-route-map)set metric 10 | Set metric as 10 |
R1(config-route-map)set weight 3465789 | Set weight as 3465789 |
R1(config-route-map)route-map myid1 permit 2 | Configure route-map myid1 with sequence number 2 |
R1(config-route-map)match ip address prefix-list P1 | Match for IP prefix-list P1 |
R1(config-route-map)continue 3 | Configure continue with sequence number 3 |
R1(config-route-map)set metric 20 | Set metric as 20. |
R1(config-route-map)set origin igp | Set origin as IGP protocol |
R1(config-route-map)route-map myid1 permit 3 | Configure route-map myid1 with sequence number 3 |
R1(config-route-map)match ip address prefix-list P2 | Match for IP prefix-list P2 |
R1(config-route-map)continue 4 | Configure continue with sequence number 4 |
R1(config-route-map)set metric 30 | Set metric as 30. |
R1(config-route-map)set as-path prepend 600 | Set as-path prepend as 600 |
R1(config-route-map)route-map myid1 permit 4 | Configure route-map myid1 with sequence number 4 |
R1(config-route-map)match ip address prefix-list P3 | Match for IP prefix-list P3. |
R1(config-route-map)set local-preference 400 | Set local preference as 400 |
R1(config-route-map)set weight 400 | Set weight as 400 |
R1(config-if)#commit | Commit the candidate configuration to the running configuration |
R1(config-route-map)exit | End the route-map |
R2(config)#interface xe32/1 | Enter interface mode. |
R2(config-if)#ip address 10.1.1.1/24 | Configure the IP address of the interface on an interface which is up and running |
R2(config-if)#commit | Commit the candidate configuration to the running configuration |
R2(config-if)#interface xe32/2 | Enter interface mode. |
R2(config-if)#ip address 10.1.2.1/24 | Configure the IP address of the interface on an interface which is up and running |
R2(config-if)#commit | Commit the candidate configuration to the running configuration |
R2(config-if)#interface xe32/4 | Enter interface mode. |
R2(config-if)#ip address 10.1.3.1/24 | Configure the IP address of the interface on an interface which is up and running |
R2(config-if)#commit | Commit the candidate configuration to the running configuration |
R2(config-if)#interface xe17/1 | Enter interface mode. |
R2(config-if)#ip address 10.1.4.1/24 | Configure the IP address of the interface on an interface which is up and running |
R2(config-if)#commit | Commit the candidate configuration to the running configuration |
R2(config-if)#interface xe21/1 | Enter interface mode. |
R2(config-if)#ip address 10.1.5.1/24 | Configure the IP address of the interface on an interface which is up and running |
R2(config-if)#commit | Commit the candidate configuration to the running configuration |
R2(config-if)#interface xe32/3 | Enter interface mode. |
R2(config-if)#ip address 20.1.1.2/24 | Configure the IP address on the connected interface. |
R2(config-if)#commit | Commit the candidate configuration to the running configuration |
R2(config-if)#exit | Exit interface mode. |
R2(config)#router bgp 100 | Configure BGP process 100 |
R2(config-router)#bgp router-id 2.2.2.2 | Configure BGP router id |
R2(config-router)#neighbor 20.1.1.1 remote-as 100 | Configure BGP remote-as 100 with neighbor IP |
R2(config-router)#redistribute connected | Redistribute the connected routes which are 10 networks here. |
R2(config-if)#commit | Commit the candidate configuration to the running configuration |
R2(config-if)#exit | Exit interface mode. |