cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2392
Views
10
Helpful
8
Replies

Cisco 3850. How can I assign an IP address to an Interface/Port

TristanGude
Level 1
Level 1
8 Replies 8

first you must convert it to L3 port by 
no switchport 
then you can assign IP to port. 

Thank you very much

You are so so welcome 

Hello,

here is an example:

3850#conf t
3850(config)#ip routing
3850(config)#interface gigabitethernet 1/0/1
3850(config-if)#no switchport
3850(config-if)#ip address 192.168.1.1 255.255.255.0

Thank you very much Sr

TristanGude
Level 1
Level 1

Now, How can I tell the router to route that IP back and forth to the switch? 

 

I am not clear what your topology is so I will assume that it is simple, perhaps the 3850 connects to some router on one of its ports. There are several options for how that connection could work. One option would be to make the 3850 port a layer 3 (using the no switchport command) interface. Configure an IP address on the 3850 and a corresponding IP address on the router. Enable ip routing on 3850 as suggested by @Georg Pauwen and configure a default route on 3850 with the router as the next hop. Configure vlans on 3850 and a vlan interface for each vlan. The vlan interfaces will be the default gateway for devices connected in the vlans. On the router configure static routes for the subnets used on 3850 or configure a dynamic routing protocol to run between the 3850 and the router.

The other alternative is to not configure ip routing on 3850. In this case you would configure vlans but not vlan interfaces on 3850. The port connecting to the router would be configured as a trunk carrying all of the vlans. The router would configure subinterfaces, each subinterface with an appropriate IP address for the vlan it is processing for. The devices connected to vlans on 3850 would have default gateway that is the router address for that subnet.

HTH

Rick

If routing is enabled on the switch, which I recall is the default for a 3850, the 3850 will route between active L3 interfaces (i.e. SVIs or routed ports, with IPs).

For the 3850 to route to networks it is not directly connected to, you need to use static route statements and/or use a dynamic routing protocol (e.g. RIP, OSPF, EIGRP).

Review Cisco Networking for a $25 gift card