ip address assignment on cisco cat switch

Answered Question
Apr 5th, 2008

hi every body !

i have few questions regarding ip address assignment on cisco cat switch.

ip address on cisco switch can be configured in following ways:

switch(config)# ip address 192.192.192.192. 255.255.255.0

Switch(config) interface vlan 1

switch(config-vlan1) ip address 192.192.192.192 255.255.255.0

now my question is how does configuring ip address using these two methods affect switch ?

my second question is about vlans and ip address.

let say i have a cisco cat switch with two vlans.

switch(config) interface vlan 1

switch(config-vlan1) ip address 192.192.192.2 255.255.255.0

switch(config) interface vlan2

switch (config-vlan2)ip address 193.193.193.193 255.255.255.0

my question is when should we assign each vlans on the switch different ip?

I have this problem too.
0 votes
Correct Answer by Jason Fraioli about 8 years 7 months ago

I didn't know there was a config level option for ip address, I always assumed the "ip address" command had to be on an interface.

In your example of the two vlans, you are creating two layer 3 vlans by assigning an IP address to each vlan. In that example, vlan 1 will be able to route to vlan 2 (assuming you enable "ip routing").

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
Loading.
Correct Answer
Jason Fraioli Sat, 04/05/2008 - 20:03

I didn't know there was a config level option for ip address, I always assumed the "ip address" command had to be on an interface.

In your example of the two vlans, you are creating two layer 3 vlans by assigning an IP address to each vlan. In that example, vlan 1 will be able to route to vlan 2 (assuming you enable "ip routing").

Actions

This Discussion