Cisco VLSM Configuration Script Guide

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 21

Cisco VLSM Configuration Script Guide

2.0 Router Configuration

Assigning IP address into R1 Ports

Command or Action Purpose


Step 1 enable Enables privileged EXEC mode.

In CLI:
R1> enable
Step 2 configure terminal Enters global configuration mode.

In CLI:
R1# configure terminal
Step 3 interface fastethernet/number Enters interface configuration mode
for the specified port interface
In CLI:
R1(config)# interface GigabitEthernet0/0
Step 4 ip address ip-address mask Assigns an IP address and a subnet
mask in the interface
In CLI:
R1(config-if)# ip address 193.8.8.1
255.255.255.128
Step 5 no shutdown Used in interface configuration
mode. “no shutdown” brings up the
In CLI: interface.
R1(config-if)# no shutdown
Cont. Assigning IP address into R1 Ports

Command or Action Purpose


Step 6 interface fastethernet/number Enters interface configuration
mode for the specified port
In CLI: interface
R1(config)# interface GigabitEthernet0/1
Step 7 ip address ip-address mask Assigns an IP address and a
subnet mask in the interface
In CLI:
R1(config-if)# ip address 193.8.8.129
255.255.255.192
Step 8 no shutdown Used in interface configuration
mode. “no shutdown” brings up the
In CLI: interface.
R1(config-if)# no shutdown
Step 9 interface fastethernet/number Enters interface configuration
mode for the specified port
In CLI: interface
R1(config)# interface Serial0/1/0
Step 10 ip address ip-address mask Assigns an IP address and a
subnet mask in the interface
In CLI:
R1(config-if)# ip address 193.8.8.241
255.255.255.248
Step 11 no shutdown Used in interface configuration
mode. “no shutdown” brings up the
In CLI: interface.
R1(config-if)# no shutdown
Assigning IP address into R2 Ports

Command or Action Purpose


Step 1 enable Enables privileged EXEC mode.

In CLI:
R2> enable
Step 2 configure terminal Enters global configuration mode.

In CLI:
R2# configure terminal
Step 3 interface fastethernet/number Enters interface configuration
mode for the specified port
In CLI: interface
R2(config)# interface GigabitEthernet0/0
Step 4 ip address ip-address mask Assigns an IP address and a
subnet mask in the interface
In CLI:
R2(config-if)# ip address 193.8.8.193
255.255.255.224
Step 5 no shutdown Used in interface configuration
mode. “no shutdown” brings up the
In CLI: interface.
R2(config-if)# no shutdown
Cont. Assigning IP address into R2 Ports

Command or Action Purpose


Step 6 interface fastethernet/number Enters interface configuration
mode for the specified port
In CLI: interface
R2(config)# interface GigabitEthernet0/1
Step 7 ip address ip-address mask Assigns an IP address and a
subnet mask in the interface
In CLI:
R2(config-if)# ip address 193.8.8.225
255.255.255.240
Step 8 no shutdown Used in interface configuration
mode. “no shutdown” brings
In CLI: up the interface.
R2(config-if)# no shutdown
Step 9 interface fastethernet/number Enters interface configuration
mode for the specified port
In CLI: interface
R2(config)# interface Serial0/1/0
Step 10 ip address ip-address mask Assigns an IP address and a
subnet mask in the interface
In CLI:
R2(config-if)# ip address 193.8.8.242
255.255.255.248
Step 11 no shutdown Used in interface configuration
mode. “no shutdown” brings
In CLI: up the interface.
R2 (config-if)# no shutdown
Establishing static routes using IP Route command in R1

Command or Action Purpose


Step 1 enable Enables privileged EXEC mode.

In CLI:
R1> enable
Step 2 configure terminal Enters global configuration mode.

In CLI:
R1# configure terminal
Step 3 ip route prefix mask ip-address To establish static routes.
prefix – Specifies the IP route prefix for the
In CLI: destination.
R1(config)# ip route 193.8.8.192 mask – Specifies the prefix mask for the
255.255.255.240 193.8.8.242 destination
ip-address - Specifies the IP address of the
next hop that can be used to reach that
network.
Step 4 ip route prefix mask ip-address To establish static routes.
prefix – Specifies the IP route prefix for the
In CLI: destination.
R1(config)# ip route 193.8.8.224 mask – Specifies the prefix mask for the
255.255.255.240 193.8.8.242 destination
ip-address - Specifies the IP address of the
next hop that can be used to reach that
network.
Establishing static routes using IP Route command in R2

Command or Action Purpose


Step 1 enable Enables privileged EXEC mode.

In CLI:
R2> enable
Step 2 configure terminal Enters global configuration mode.

In CLI:
R2# configure terminal
Step 3 ip route prefix mask ip-address To establish static routes.
prefix – Specifies the IP route prefix for the
In CLI: destination.
R2(config)# ip route 193.8.8.0 mask – Specifies the prefix mask for the
255.255.255.128 193.8.8.241 destination
ip-address - Specifies the IP address of the
next hop that can be used to reach that
network.
Step 4 ip route prefix mask ip-address To establish static routes.
prefix – Specifies the IP route prefix for the
In CLI: destination.
R2(config)# ip route 193.8.8.128 mask – Specifies the prefix mask for the
255.255.255.192 193.8.8.241 destination
ip-address - Specifies the IP address of the
next hop that can be used to reach that
network.
2.1.1 Assigning IP address into Router (ABR-1) Ports

Commands Function
Step 1 enable Enables privileged EXEC
mode.
In CLI:
Router> enable
Step 2 configure terminal Enters global configuration
mode.
In CLI:
Router# configure terminal
Step 3 hostname Sets the hostname to ABR-1.

In CLI:
Router(config)# hostname ASBR
Step 4 interface fastethernet/number Enters interface
configuration mode for the
In CLI: specified fast ethernet
ASBR(config)# interface Fastethernet0/0 interface.
Step 5 ip address ip-address mask Assigns an IP address and a
subnet mask.
In CLI:
ASBR(config-if)# ip address 172.16.1.1
255.255.255.0
Step 6 no shutdown Used in interface
configuration mode. “no
In CLI: shutdown” brings up the
ASBR(config-if)# no shutdown interface.

Step 7 interface fastethernet/number Enters interface


configuration mode for the
In CLI: specified loopback interface.
ASBR(config-if)# interface loopback 10

2.1.2 Cont. Assigning IP address into Router (ASBR) Ports

Step 8 ip address ip-address mask Assigns an IP address and a


subnet mask.
In CLI:
ASBR(config-if)# ip address 10.1.0.1
255.255.255.0
Step 9 interface fastethernet/number Enters interface
configuration mode for the
In CLI: specified loopback interface.
ASBR(config-if)# interface loopback 11
Step 10 ip address ip-address mask Assigns an IP address and a
subnet mask.
In CLI:
ASBR(config-if)# ip address 11.0.0.1 255.0.0.0
Step 11 interface fastethernet/number Enters interface
configuration mode for the
In CLI: specified loopback interface.
ASBR(config-if)# interface loopback 12
Step 12 ip address ip-address mask Assigns an IP address and a
subnet mask.
In CLI:
ASBR(config-if)# ip address 12.0.0.1 255.0.0.0
Step 13 interface fastethernet/number Enters interface
configuration mode for the
In CLI: specified loopback interface.
ASBR(config-if)# interface loopback 13
Step 14 ip address ip-address mask Assigns an IP address and a
subnet mask.
In CLI:
ASBR(config-if)# ip address 13.0.0.1 255.0.0.0

Step 15 interface fastethernet/number Enters interface configuration


mode for the specified loopback
In CLI: interface.
ASBR(config-if)# interface loopback 14
Step 16 ip address ip-address mask Assigns an IP address and a
subnet mask.
In CLI:
ASBR(config-if)# ip address 192.168.1.1
255.255.255.255
Step 17 exit Returns to global configuration
mode.
In CLI:
ASBR(config-if)# exit

2.1.3 Implementing OSPF Protocol in Router (ASBR)

Command or Action Purpose


Step 1 router ospf process-id Enables OSPF routing,
and enter router
In CLI: configuration mode.
ASBR(config)# router ospf 10
Step 2 network ip-address wildcard-mask area area-id Define an interface on
which OSPF runs and
In CLI: the area ID for that
ASBR(config-router)# network 172.16.1.0 0.0.0.255 interface.
area 0
Step 3 network ip-address wildcard-mask area area-id Define an interface on
which OSPF runs and
In CLI: the area ID for that
ASBR(config-router)# network 192.168.1.1 0.0.0.0 interface.
area 0
Step 4 network ip-address wildcard-mask area area-id Define an interface on
which OSPF runs and
In CLI: the area ID for that
ASBR(config-router)# network 10.1.0.0 0.0.0.255 interface.
area 0
Step 5 network ip-address wildcard-mask area area-id Define an interface on
which OSPF runs and
In CLI: the area ID for that
ASBR(config-router)# network 11.0.0.0 interface.
0.255.255.255 area 0
Step 6 network ip-address wildcard-mask area area-id Define an interface on
which OSPF runs and
In CLI: the area ID for that
ASBR(config-router)# network 12.0.0.0 interface.
0.255.255.255 area 0
Step 7 network ip-address wildcard-mask area area-id Define an interface on
which OSPF runs and
In CLI: the area ID for that
ASBR(config-router)# network 13.0.0.0 interface.
0.255.255.255 area 0
Step 8 passive-interface loopback-id Used to suppress
OSPF hello packets
In CLI: on a specified
ASBR(config-router)# passive-interface loopback10
interface.
Step 9 passive-interface loopback-id Used to suppress
OSPF hello packets
In CLI: on a specified
ASBR(config-router)# passive-interface loopback11
interface.
Step 10 passive-interface loopback-id Used to suppress
OSPF hello packets
on a specified
In CLI: interface.
ASBR(config-router)# passive-interface loopback12

Step 11 passive-interface loopback-id Used to suppress


OSPF hello packets
In CLI: on a specified
ASBR(config-router)# passive-interface loopback13
interface.
Step 12 passive-interface loopback-id Used to suppress
OSPF hello packets
In CLI: on a specified
ASBR(config-router)# passive-interface loopback14
interface.

2.2.1 Assigning IP address into Router (ABR-1) Ports

Commands Function
Step 1 enable Enables privileged EXEC
mode.
In CLI:
Router> enable
Step 2 configure terminal Enters global configuration
mode.
In CLI:
Router# configure terminal
Step 3 hostname Sets the hostname to ABR-1.

In CLI:
Router(config)# hostname ABR-1
Step 4 interface fastethernet/number Enters interface configuration
mode for the specified fast
In CLI: ethernet interface.
ABR-1(config)# interface Fastethernet0/0
Step 5 ip address ip-address mask Assigns an IP address and a
subnet mask.
In CLI:
ABR-1(config-if)# ip address 172.16.1.2
255.255.255.0
Step 6 no shutdown Used in interface configuration
mode. “no shutdown” brings
In CLI: up the interface.
ABR-1(config-if)# no shutdown
Step 7 interface fastethernet/number Enters interface configuration
mode for the specified serial
In CLI: interface.
ABR-1(config-if)# interface FastEthernet0/1

2.2.2 Cont. Assigning IP address into Router (ABR-1) Ports

Step 8 ip address ip-address mask Assigns an IP address and a


subnet mask.
In CLI:
ABR-1(config-if)# ip address 172.16.51.1
255.255.255.0
Step 9 no shutdown Enables the interface, changing its
state from administratively down to
In CLI: administratively up.
ABR-1(config-if)# no shutdown
Step 10 interface fastethernet/number Enters interface configuration
mode for the specified loopback
interface.
In CLI:
ABR-1(config-if)# interface loopback 20
Step 11 ip address ip-address mask Assigns an IP address and a
subnet mask.
In CLI:
ABR-1(config-if)# ip address 192.168.2.1
255.255.255.255
Step 12 no shutdown Enables the interface, changing its
state from administratively down to
In CLI: administratively up.
ABR-1(config-if)# no shutdown
Step 13 exit Returns to global configuration
mode.
In CLI:
ABR-1(config-if)# exit

2.2.3 Implementing OSPF Protocol in Router (ABR-1)

Command or Action Purpose


Step 1 router ospf process-id Enables OSPF routing, and
enter router configuration
In CLI: mode.
ABR-1(config)# router ospf 10
Step 2 network ip-address wildcard-mask area area-id Define an interface on which
OSPF runs and the area ID
In CLI: for that interface.
ABR-2(config-router)# network 172.16.1.0
0.0.0.255 area 0
Step 3 network ip-address wildcard-mask area area-id Define an interface on which
OSPF runs and the area ID
In CLI: for that interface.
ABR-2(config-router)# network 172.16.51.0
0.0.0.255 area 1
Step 4 network ip-address wildcard-mask area area-id Define an interface on which
OSPF runs and the area ID
In CLI: for that interface.
ABR-2(config-router)# network 192.168.2.1
0.0.0.0 area 51
Step 5 passive-interface loopback-id Used to suppress OSPF
hello packets on a
In CLI: specified interface.
ABR-2(config-router)# passive-interface
loopback20

2.3.1 Assigning IP address into Router (ABR-2) Ports


Commands Function
Step 1 enable Enables privileged EXEC
mode.
In CLI:
Router> enable
Step 2 configure terminal Enters global configuration
mode.
In CLI:
Router# configure terminal
Step 3 hostname Sets the hostname to ABR-2.
In CLI:
Router# hostname ABR-2
Step 4 interface fastethernet/number Enters interface configuration
mode for the specified fast
In CLI: ethernet interface.
ABR-2(config)# interface Fastethernet0/0
Step 5 ip address ip-address mask Assigns an IP address and a
subnet mask.
In CLI:
ABR-2(config-if)# ip address 172.16.1.3
255.255.255.0
Step 6 no shutdown Used in interface configuration
mode. “no shutdown” brings
In CLI: up the interface.
ABR-2(config-if)# no shutdown
Step 7 interface fastethernet/number Enters interface configuration
mode for the specified serial
In CLI: interface.
ABR-2(config-if)# interface Serial0/1/0

2.3.2 Cont. Assigning IP address into Router (ABR-2) Ports

Step 8 ip address ip-address mask Assigns an IP address and a


subnet mask.
In CLI:
ABR-2(config-if)# ip address 172.16.10.5
255.255.255.252
Step 9 no shutdown Enables the interface, changing its
state from administratively down to
In CLI: administratively up.
ABR-2(config-if)# no shutdown
Step 10 clock rate bps(bits/sec) To configure the clock rate for the
hardware connections on serial
In CLI: interfaces.
ABR-2(config-if) # clock rate 64000
Step 10 interface fastethernet/number Enters interface configuration
mode for the specified loopback
In CLI: interface.
ABR-2(config-if)# interface loopback 30
Step 11 ip address ip-address mask Assigns an IP address and a
subnet mask.
In CLI:
ABR-2(config-if)# ip address 192.168.3.1
255.255.255.255
Step 12 no shutdown Enables the interface, changing its
state from administratively down to
In CLI: administratively up.
ABR-2(config-if)# no shutdown
Step 13 exit Returns to global configuration
mode.
In CLI:
ABR-2(config-if)# exit

2.3.3 Implementing OSPF Protocol in Router (ABR-2)

Command or Action Purpose


Step 1 router ospf process-id Enables OSPF routing, and
enter router configuration
In CLI: mode.
ABR-2(config)# router ospf 10
Step 2 network ip-address wildcard-mask area area-id Define an interface on which
OSPF runs and the area ID
In CLI: for that interface.
ABR-2(config-router)# network 172.16.1.0
0.0.0.255 area 0
Step 3 network ip-address wildcard-mask area area-id Define an interface on which
OSPF runs and the area ID
In CLI: for that interface.
ABR-2(config-router)# network 172.16.10.4
0.0.0.3 area 1
Step 4 network ip-address wildcard-mask area area-id Define an interface on which
OSPF runs and the area ID
In CLI: for that interface.
ABR-2(config-router)# network 192.168.3.0
0.0.0.0 area 1
Step 5 passive-interface loopback-id Used to suppress OSPF
hello packets on a
In CLI: specified interface.
ABR-2(config-router)# passive-interface
loopback30

2.4.1 Assigning IP address into Router (Internal) Ports


Commands Function
Step 1 enable Enables privileged EXEC
mode.
In CLI:
Router> enable
Step 2 configure terminal Enters global configuration
mode.
In CLI:
Router# configure terminal
Step 3 hostname Sets the hostname to Internal.
In CLI:
Router# hostname Internal
Step 4 interface fastethernet/number Enters interface configuration
mode for the specified fast
In CLI: ethernet interface.
Internal(config)# interface Fastethernet0/0
Step 5 ip address ip-address mask Assigns an IP address and a
subnet mask.
In CLI:
Internal(config-if)# ip address 172.16.20.1
255.255.255.0
Step 6 no shutdown Used in interface configuration
mode. “no shutdown” brings
In CLI: up the interface.
Internal(config-if)# no shutdown
Step 7 interface fastethernet/number Enters interface configuration
mode for the specified serial
In CLI: interface.
Internal(config-if)# interface Serial0/1/0

2.4.2 Cont. Assigning IP address into Router (Internal) Ports

Step 8 ip address ip-address mask Assigns an IP address and a


subnet mask.
In CLI:
Internal(config-if)# ip address 172.16.10.6

255.255.255.252
Step 9 no shutdown Enables the interface, changing its
state from administratively down to
In CLI: administratively up.
Internal(config-if)# no shutdown
Step 10 interface fastethernet/number Enters interface configuration
mode for the specified loopback
interface.
In CLI:
Internal(config-if)# interface loopback 40
Step 11 ip address ip-address mask Assigns an IP address and a
subnet mask.
In CLI:
Internal(config-if)# ip address 192.168.4.1
255.255.255.255
Step 12 no shutdown Enables the interface, changing its
state from administratively down to
In CLI: administratively up.
Internal(config-if)# no shutdown
Step 13 exit Returns to global configuration
mode.
In CLI:
Internal(config-if)# exit

2.4.3 Implementing OSPF Protocol in Router (Internal)

Command or Action Purpose


Step 1 router ospf process-id Enables OSPF routing, and
enter router configuration
In CLI: mode.
Internal(config)# router ospf 10
Step 2 network ip-address wildcard-mask area area-id Define an interface on which
OSPF runs and the area ID
In CLI: for that interface.
Internal(config-router)# network 172.16.20.0
0.0.0.255 area 0
Step 3 network ip-address wildcard-mask area area-id Define an interface on which
OSPF runs and the area ID
In CLI: for that interface.
Internal(config-router)# network 172.16.10.4
0.0.0.3 area 1
Step 4 network ip-address wildcard-mask area area-id Define an interface on which
OSPF runs and the area ID
In CLI: for that interface.
Internal(config-router)# network 192.168.4.1
0.0.0.0 area 1
Step 5 passive-interface loopback-id Used to suppress OSPF
hello packets on a
In CLI: specified interface.
Internal(config-router)# passive-interface
loopback40

You might also like