L2 and L3 Ip configuration difference?
Hi,
I'm confused between this two configuration
interface TenGigabitEthernet3/1
switchport
switchport access vlan 999
switchport mode access
switchport nonegotiate
no ip address
logging event link-status
!
interface Vlan 999
ip address 10.193.1.141 255.255.255.252
no ip redirects
no ip proxy-arp
ip pim sparse-dense-mode
ip route-cache flow
logging event link-status
end
compare to this
interface TenGigabitEthernet3/1
no switchport
ip add 10.193.1.141 255.255.255.252
no ip redirects
no ip proxy-arp
ip pim sparse-dense-mode
ip route-cache flow
logging event link-status
!
Both have the same output but what is the difference why do still need to create SVI then assigned to physical interface?
Thanks
I'm confused between this two configuration
interface TenGigabitEthernet3/1
switchport
switchport access vlan 999
switchport mode access
switchport nonegotiate
no ip address
logging event link-status
!
interface Vlan 999
ip address 10.193.1.141 255.255.255.252
no ip redirects
no ip proxy-arp
ip pim sparse-dense-mode
ip route-cache flow
logging event link-status
end
compare to this
interface TenGigabitEthernet3/1
no switchport
ip add 10.193.1.141 255.255.255.252
no ip redirects
no ip proxy-arp
ip pim sparse-dense-mode
ip route-cache flow
logging event link-status
!
Both have the same output but what is the difference why do still need to create SVI then assigned to physical interface?
Thanks
Comments
But, probably what your talking about is the difference between:
for the top: switchport mode access
and for the bottom: no switchport
with the top: your assigning an ip to the svi
on the bottom: you assigning an ip to the port. this port doesn't do switching and isn't a member of a vlan. probably meant to be used for performing routing.
It should be noted that behind the scenes, the second config acts as the first. A vlan is reserved and used by the switch to make this functionality occur.
1st config you would use on a L3 switch to assign multiple ports to an SVI "access layer". 2nd Config you would assign to a L3 switch "port" and route back to your core "distribution layer".
One reason you would use the first config would be if the ports you are using don't support layer three. Examples would be Etherswitch modules (addon layer 2 modules for when you don't need a dedicated switch), routers with built in switches (ie 800 series), or perhaps old chassis based switches that only have layer 2 ports/blades.
Your first config is odd because you only have one more usable IP due to the /30 mask. So you would probably use this for transit, (device to device connection), segregation of one device, or as a management IP for the device. If the subnet was bigger than a /30 then this device would probably a default gateway for a subnet (ie the interface Vlan999 IP address could be 192.168.1.1 and serve as the gateway for the 192.168.1.0 subnet).