cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2368
Views
0
Helpful
6
Replies

Cisco 887 Scripting - VLAN and FastEthernet internface IP assign

gcjicomms
Level 1
Level 1

Hi,

I am learning scripting on a Cisco 887 Router (ADSL2+). Im trying to set it up so I can use it on my home connection although Ive hit a few stumbles, all of which Ive researched how to get them working but have not had any success.

I am trying to assign an IP address to FastEthernet0 so I can then connect to the Router via Ethernet. I have found that to do so I must create a VLAN first then assign that VLAN to the FastEthernet0 interface. Multiple things which I cant work out are. I have factory reset the router to make this as easy as possible to run through my steps. At this stage Id just like to get an IP address assigned to FastEthernet0 so I can plug into it with a laptop and connect/ping the router.

 

Router#config t

Router(config)#interface vlan1

Router(config-if)#ip address 10.1.1.1 255.255.255.0

Router(config-if)#no shutdown

Router(config-if)#exit

Router(config)#interface fastethernet0

Router(config-if)#switchport access vlan 1

Router(config-if)#no shutdown 

Router(config-if)#exit

Router(config)#exit

Router#show ip int bri

 

FastEthernet0    unassigned   YES   unset      administratively down     down

Vlan1                  10.1.1.1        YES   manual   down                               down

 

I may have gotten a few extra things in last time I did it though this was just quickly trying again from scratch.

Why is Vlan1 still down after 'no shutdown' command?

Why is FastEthernet0 still down after 'no shutdown' command?

how do I assign VLAN1 to FastEthernet0?

 

Thanks in advance,

Jordan.

 

 

 

6 Replies 6

By default, vlan1 is assigned to all switchports. But do you have anything connected to the switch? The vlan will stay down until you connect something physically.

If you want to make sure that the vlan is up, also without a connected system, you can disable the autostate:

int Vlan 1
 no autostate
 

I have plugged in to FE0 and managed to get the VLAN1 port up and the FastEthernet0 port up, although the FastEthernet0 port still has no IP address?

 

So status now is:

FastEthernet0    unassigned   YES   unset      up     up

Vlan1                  10.1.1.1        YES   manual   up     up

 

I have tried doing the 'switchport mode access' and 'switchport access vlan 1' on the FastEthernet0 interface but still cant seem to get it working?

Any ideas?

 

Works as designed. The switchport is the Layer2 instance, the vlan-interface is the Layer3 instance. The two mentioned commands are default, so they are not visible in the config.

You can control the vlan-assignment with the command

router#show vlan-switch

Now you have to go on with your config. When connected to the router. Configure your PC an IP in the same ip subnet as VLAN 1 and ping 10.1.1.1. Does that work?

If yes, then the next steps are:

  1. The dialer-interface to connect to the internet
  2. default-route
  3. NAT/PAT

So what still needs to be done to get an ip to show up in 'show ip int bri' under 'FastEthernet0'? Or are you saying I should just try and assign a static ip to the laptop and try now (ie: it is ready to go)? If so, why is no no IP showing on show ip int bri?

 

Im guessing the three other things you mentioned are basically the ADSL connection, the route to the ISP and a DNS server address? I will do these next.

 

Thanks for your assistance, it's much appreciated, just not 100% sure what your saying here. I will try this tonight when I get home.

 

jasonhilt69
Level 1
Level 1

"I am trying to assign an IP address to FastEthernet0 so I can then connect to the Router via Ethernet."
 

If you want to assign an IP address directly to the port you have to use the "no switchport" command directly on the port itself.  You won't assign a vlan to the interface then.

https://supportforums.cisco.com/discussion/10539796/what-use-no-switch-port-command-l3-switch

 

This feature is not available on the 880 series. The IP-config has to be done on a vlan-interface.