You are on page 1of 5

Assign IP Address on Layer 3 Switch Port

Assign IP Address on Switch Port


S_A(config)#int f 0/1
S_A(config-if)#no switchport
S_A(config-if)#ip address 10.1.1.10 255.0.0.0
S_A(config-if)#no shutdown

S_A(config)#int f 0/2
S_A(config-if)#no switchport
S_A(config-if)#ip address 20.1.1.10 255.0.0.0
S_A(config-if)#no shutdown

Enable Routing on Switch


S_A(config)#ip routing

Verification
S_A#show ip route
C 10.0.0.0/8 is directly connected, FastEthernet0/1C
20.0.0.0/8 is directly connected, FastEthernet0/2
S_A#ping 20.1.1.1
S_A#ping 10.1.1.1

Note: - without IP Routing command we cannot ping from 10.1.1.1 to 20.1.1.1


means computer to computer.

PC>arp -a
Internet Address Physical Address Type
10.1.1.10 0006.2ace.6e01 Dynamic

S_A#show arp
Protocol Address Age (min) Hardware Addr Type Interface
Internet 10.1.1.1 4 0060.475D.1820 ARPA FastEthernet0/1
Internet 10.1.1.10 - 0006.2ACE.6E01 ARPA FastEthernet0/1
Internet 20.1.1.1 4 0040.0B39.42D0 ARPA FastEthernet0/2

PMSDYP Training under NAVTTC


Corvit Systems Faisalabad
Assign IP Address on Layer 3 Switch Port
Internet 20.1.1.10 - 0006.2ACE.6E02 ARPA FastEthernet0/2
S_A#

How to Check Port Fasternet 0/1 MAC Address


S_A#show interfaces fastEthernet 0/1
FastEthernet0/1 is up, line protocol is up (connected)
Hardware is Lance, address is 0006.2ace.6e01 (bia 0006.2ace.6e01)

PMSDYP Training under NAVTTC


Corvit Systems Faisalabad
SVI (SWITCH VIRTUAL INTERFACE)

Switch(config)#vlan 10
Switch(config-vlan)#exit
Switch(config)#vlan 20
Switch(config-vlan)#exit

Switch(config)#interface fastEthernet 0/1


Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 10
Switch(config-if)#exit

Switch(config)#interface fastEthernet 0/2


Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 10
Switch(config-if)#exit

Switch(config)#interface fastEthernet 0/23


Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 20
Switch(config-if)#exit

Switch(config)#interface fastEthernet 0/24


Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 20
Switch(config-if)#exit

Switch(config)#ip routing
Note:- IP Routing Command we can run only on Layer 3 Switch, Layer 2 Switches
will not Support IP Routing Command.
Create SVI
Switch(config)#interface vlan 10
Switch(config-if)#ip address 10.1.1.1 255.0.0.0
Switch(config-if)#exit
Switch(config)#int vlan 20
Switch(config-if)#ip address 20.1.1.1 255.0.0.0
Switch(config-if)#exit

Switch#show ip route

PMSDYP Training under NAVTTC


Corvit Systems Faisalabad
Inter VLAN Routing With OSPF

A(config)#ip routing
A(config)#vlan 10
A(config-vlan)#exit
A(config)#int vlan 10
A(config-if)#ip address 10.1.1.10 255.0.0.0
A(config-if)#exit

A(config)#interface fastEthernet 0/3


A(config-if)#switchport mode access
A(config-if)#switchport access vlan 10
A(config-if)#exit

A#show int vlan 10


A#ping 10.1.1.1

A(config)#interface fastEthernet 0/1


A(config-if)#no switchport
A(config-if)#ip address 100.1.1.1 255.0.0.0
A(config-if)#exit

A#show ip route
C 10.0.0.0/8 is directly connected, Vlan10
C 100.0.0.0/8 is directly connected, FastEthernet0/1

B(config)#ip routing
B(config)#vlan 20
B(config-vlan)#exit
B(config)#interface vlan 20
B(config-if)#ip address 20.1.1.10 255.0.0.0
B(config-if)#exit

PMSDYP Training under NAVTTC


Corvit Systems Faisalabad
B(config)#interface fastEthernet 0/3
B(config-if)#switchport mode access
B(config-if)#switchport access vlan 20
B(config-if)#exit

B(config)#interface fastEthernet 0/1


A(config-if)#no switchport
B(config-if)#ip address 100.1.1.2 255.0.0.0
B(config-if)#no shutdown

B#show ip route
C 20.0.0.0/8 is directly connected, Vlan20
C 100.0.0.0/8 is directly connected, FastEthernet0/1

A(config)#router ospf 1
A(config-router)#network 10.0.0.0 0.255.255.255 a 0
A(config-router)#network 100.0.0.0 0.255.255.255 a 0
A(config-router)#exit

B(config)#router ospf 1
B(config-router)#network 20.0.0.0 0.255.255.255 a 0
B(config-router)#network 100.0.0.0 0.255.255.255 a 0
B(config-router)#exit

PMSDYP Training under NAVTTC


Corvit Systems Faisalabad

You might also like