Labs 9 1 and 9 2:Build a Network - Oliver-Mustoe/Oliver-Mustoe-Tech-Journal GitHub Wiki

In these labs, we used BGP and OSPF to setup networks that are able to talk to one another through ISP routers.

Notes

Below are the router configurations to setup the given packet tracer (see screenshot.) As 9-2 is an extension of 9-1, I decided to show the configurations for 9-2 as the "main" configurations. Below all of the main router configurations is an "Extras" section which has the the pre-9-2 configuration for BTV-ROUTER, since it was the only router config changed from 9-1 to 9-2. Below the main configurations is an explanation of what each command is doing (general usage, not specified to any device.)

image


BTV-ROUTER:

enable
config t
hostname BTV-ROUTER
interface FastEthernet 0/1
ip address 192.168.2.2 255.255.255.252
no shutdown
interface FastEthernet 0/0
ip address 172.16.10.1 255.255.255.0
no shutdown
interface Serial 0/1/0
ip address 172.16.0.1 255.255.255.252
no shutdown
router ospf 1
default-information originate
network 172.16.10.0 0.0.0.255 area 0
network 172.16.0.0 0.0.0.3 area 0
ip route 0.0.0.0 0.0.0.0 192.168.2.1
router bgp 3033
neighbor 192.168.2.1 remote-as 1010
redistribute ospf 1


MTL_ROUTER:

enable
conf t
hostname MTL_ROUTER
interface FastEthernet 0/0
ip address 172.16.20.1 255.255.255.0
no shutdown
interface Serial 0/1/0
ip address 172.16.0.2 255.255.255.252
no shutdown
router ospf 1
network 172.16.0.0 0.0.0.3 area 0
network 172.16.20.0 0.0.0.255 area 0


BTV-DIST-MULTI-LAYER-SWITCH:

enable
conf t
hostname BTV-DIST-MULTI-LAYER-SWITCH
ip routing
interface vlan 1
no shutdown
interface vlan 5
no shutdown
ip address 172.16.5.1 255.255.255.0
interface range FastEthernet 0/2
switchport access vlan 5
interface vlan 6
no shutdown
ip address 172.16.6.1 255.255.255.0
interface range FastEthernet 0/6
switchport access vlan 6
interface vlan 10
no shutdown
ip address 172.16.10.2 255.255.255.0
interface range FastEthernet 0/1
switchport access vlan 10
router ospf 1
network 172.16.5.0 0.0.0.255 area 0
network 172.16.6.0 0.0.0.255 area 0
network 172.16.10.0 0.0.0.255 area 0


PARTNER-ROUTER:

enable
conf t
hostname PARTNER-ROUTER
interface FastEthernet 0/1
ip address 10.15.6.1 255.255.255.0
no shutdown
interface FastEthernet 0/0
ip address 192.168.3.2 255.255.255.252
no shutdown
router bgp 34908
neighbor 192.168.3.1 remote-as 2054
network 10.15.6.0 mask 255.255.255.0


CUSTOMER-ROUTER:

enable
conf t
hostname CUSTOMER-ROUTER
interface FastEthernet 0/0
ip address 10.200.24.1 255.255.255.0
no shutdown
interface Serial 0/1/0
ip address 192.168.4.2 255.255.255.252
no shutdown
router bgp 5132
neighbor 192.168.4.1 remote-as 2054
network 10.200.24.0 mask 255.255.255.0


PACIFIC-ISP:

enable
conf t
hostname PACIFIC-ISP
interface FastEthernet 0/0
ip address 192.168.1.2 255.255.255.252
no shutdown
interface FastEthernet 0/1
ip address 192.168.3.1 255.255.255.252
no shutdown
interface Serial 0/1/0
ip address 192.168.4.1 255.255.255.252
no shutdown
router bgp 2054
neighbor 192.168.1.1 remote-as 1010
neighbor 192.168.3.2 remote-as 34908
neighbor 192.168.4.2 remote-as 5132
network 192.168.3.0 mask 255.255.255.252
network 192.168.4.0 mask 255.255.255.252


VERMONT-ISP:

enable
conf t
hostname VERMONT-ISP
interface FastEthernet 0/0
ip address 192.168.1.1 255.255.255.252
no shutdown
interface FastEthernet 0/1
ip address 192.168.2.1 255.255.255.252
no shutdown
router bgp 1010
neighbor 192.168.2.2 remote-as 3033
neighbor 192.168.1.2 remote-as 2054
network 192.168.1.0 mask 255.255.255.252
network 192.168.2.0 mask 255.255.255.252

Command explanations:

Replace everything in {} with what it is asking for:

  • enable and conf t = Getting into configuration mode
  • hostname {HOSTNAME} = Setting hostname
  • interface {INTERFACE_NAME (usually gig or fast)} {NUMBER/NUMBER (usually 0/something)} = get into the mode to configure the interface
  • no shutdown = Turn the interface on
  • ip address {IP_ADDRESS} {SUBNET_MASK} = Setting the IP of that interface
  • router ospf {INSTANCE_NUMBER (usually 1)} = Get into the OSPF config on the router
  • network {CONNECTED_NETWORK} {WILDCARD_SUBNET_MASK_OF_CONNECTED_NETWORK (Sub 255 from subnet mask)} area {AREA_NUMBER (often 0 in a flat network)} = Advertise what networks are directly connected to the router being configured, in a certain area.
  • router bgp {AS_NUMBER} = Create BGP instance on router with AS number (used for other routers to neighbor.)
  • neighbor {IP_ADDR} remote-as {DEVICE_WITH_IP_ADDR_AS} = Identify peer neighbors with IP address and it's AS number.
  • network {NETWORK_IP_ADDR} mask {SUBNET_MASK} = Advertise the network (route) with BGP (NOTE: Only one router should be advertising a network (route).)
  • redistribute ospf {NUM (same as number from router OSPF)} = Redistribute routes from other protocols to the OSPF process.
  • default-information originate = Have OSPF advertise the default route to neighbors.
  • ip route 0.0.0.0 0.0.0.0 {IP_ADDRESS} = Specify the IP of the default route (route to take when no other routes can be taken.)

Extras

BTV-ROUTER:

enable
config t
hostname BTV-ROUTER
interface FastEthernet 0/1
ip address 192.168.2.2 255.255.255.252
no shutdown
interface FastEthernet 0/0
ip address 172.16.10.1 255.255.255.0
no shutdown
interface Serial 0/1/0
ip address 172.16.0.1 255.255.255.252
no shutdown
router ospf 1
default-information originate
network 172.16.10.0 0.0.0.255 area 0
network 172.16.0.0 0.0.0.3 area 0
ip route 0.0.0.0 0.0.0.0 192.168.2.1

Sources: