Switching - A Headache

PashPash Member Posts: 1,600 ■■■■■□□□□□
Hi there,

Well I decided to try and re-create a lab I did a while back at my training college, here is the layout in boson netsim:

http://www.digitalempathy.myby.co.uk/labsetup1.jpg

Its fairly simple, 1x 2620 router, 2x 2950 switches and 6 hosts connected spread over 3 vlans.

The configuration (ill have to type this if i had a scanner i could print the whole lab pack and my entries into the cli but also my handwriting scares people):

Switch1:-


interface vlan1
ip address 192.100.1.1 255.255.255.0
no shut

vlan database
vtp server

vlan 5 name finance
vlan 10 name sales
vlan 20 name admin
exit

interface range fa 0/3 - 5 (port 3 is where my host is connected)
switchport access vlan 5
switchport mode access

interface range fa 0/6 - 9 (port 6 is where my host is connected)
switchport access vlan 10
switchport mode access

interface range fa 0/10 - 12 (port 10 is where my host is connected)
switchport access vlan 20
switchport mode access

vlan database
vtp domain ccna (ccna being my domain name)

interface fa 0/1 (fa 0/1 being my trunk port)
switchport mode trunk
switchport trunk allowed vlan all (for some reason this command doesnt work, not sure why)


Switch2:-

interface vlan1
ip address 192.100.1.2 255.255.255.0
no shut

vlan database
vtp client
vtp domain ccna

interface fa 0/1 (fa 0/1 being my trunk port)
switchport mode trunk
switchport trunk allowed vlan all (for some reason this command doesnt work, not sure why)

interface range fa 0/3 - 5 (port 3 is where my host is connected)
switchport access vlan 5
switchport mode access

interface range fa 0/6 - 9 (port 6 is where my host is connected)
switchport access vlan 10
switchport mode access

interface range fa 0/10 - 12 (port 10 is where my host is connected)
switchport access vlan 20
switchport mode access


Gateway(router):-

interface fa 0/0
no shut

int fa 0/0.1
encap dot1q 1
ip address 192.100.1.3 255.255.255.0
no shut

int fa 0/0.5
encap dot1q 5
ip address 192.100.5.1 255.255.255.0
no shut

int fa 0/0.10
encap dot1q 10
ip address 192.100.10.1 255.255.255.0
no shut

int fa 0/0.20
encap dot1q 20
ip address 192.100.20.1 255.255.255.0
no shut


Switch1:-


int fa 0/2 (port 2 being my trunk port between the router)
switchport mode trunk
switchport trunk allowed vlan all (for some reason this command doesnt work, not sure why)


Switch1 & Switch2:-

ip default-gateway 192.100.1.3


So basically i then configured a few of the host's (setting the default gateway as the vlan1 ip address on the switches, of course depending on what switch the host was connected to), i could ping in the same vlan subnet between host's. No problems there, but when I tried pinging between vlan's no such luck.

Im really lost to as why its not working, the lab at my training college worked but that was hands on with the equipment in sight and im fairly i am using the right equipment.

Can anyone maybe tell me if I have gone wrong somewhere and why that command ive pointed at doesnt work.

Thanks very much.

Update: i have tried checking to see if the trunk ports recognise the vlans, and as far as im aware they do although the command "show int fa *port number* trunk" isnt a valid command according to the IOS :rolleyes:
DevOps Engineer and Security Champion. https://blog.pash.by - I am trying to find my writing style, so please bear with me.

Comments

  • EdTheLadEdTheLad Member Posts: 2,111 ■■■■□□□□□□
    Pash wrote:

    So basically i then configured a few of the host's (setting the default gateway as the vlan1 ip address on the switches, of course depending on what switch the host was connected to), i could ping in the same vlan subnet between host's. No problems there, but when I tried pinging between vlan's no such luck.

    The config looks good, you are setting the defaut gateway
    of the pcs incorrectly,they should be set to the corresponding sub interface ip address on the gateway router.
    Networking, sometimes i love it, mostly i hate it.Its all about the $$$$
  • keenonkeenon Member Posts: 1,922 ■■■■□□□□□□
    i'll add this the speed and duplex needs to be hard set on all connecting uplink ports( router and switches), i'm not sure which switch models your using but setting the trunk encap is always good
    Become the stainless steel sharp knife in a drawer full of rusty spoons
  • PashPash Member Posts: 1,600 ■■■■■□□□□□
    ed_the_lad wrote:
    Pash wrote:

    So basically i then configured a few of the host's (setting the default gateway as the vlan1 ip address on the switches, of course depending on what switch the host was connected to), i could ping in the same vlan subnet between host's. No problems there, but when I tried pinging between vlan's no such luck.

    The config looks good, you are setting the defaut gateway
    of the pcs incorrectly,they should be set to the corresponding sub interface ip address on the gateway router.

    Yeh, sorry i should of mentioned I corrected that. Still no luck after that im afraid icon_sad.gif
    keenon wrote:
    i'll add this the speed and duplex needs to be hard set on all connecting uplink ports( router and switches), i'm not sure which switch models your using but setting the trunk encap is always good

    Im using 2950 switches in the sim. I also run the "switchport trunk encap dot1q" command just to be sure, my fault I didnt mention it above.

    Well thanks for the fast response fella's. I guess ill retry this lab tommorow when I have some spare time.

    Cheers.
    DevOps Engineer and Security Champion. https://blog.pash.by - I am trying to find my writing style, so please bear with me.
  • pannupanditpannupandit Member Posts: 92 ■■□□□□□□□□
    Is there any need to give default gateway on switch.just set it right on the different nodes.then try it...
  • PashPash Member Posts: 1,600 ■■■■■□□□□□
    done the configuration again this morning and its worked :)

    I think I must of not used the exit command when configuring the second switch last time. It works a dream now, just checking out the show commands etc to make sure im heads up on them.
    DevOps Engineer and Security Champion. https://blog.pash.by - I am trying to find my writing style, so please bear with me.
  • J2tehkJ2tehk Member Posts: 24 ■□□□□□□□□□
    I just loaded your configs on my Boson Netsim and couldn't get it to work. Did you change your configs in anyway to get it to work?
  • PashPash Member Posts: 1,600 ■■■■■□□□□□
    J2tehk wrote:
    I just loaded your configs on my Boson Netsim and couldn't get it to work. Did you change your configs in anyway to get it to work?

    Yes I did my friend, I made sure that I i issued the exit command on switch2 after i had finished configuring it as a client and adding it to the domain, while adding it to the vtp domain im fairly sure this is instantaneous making it a client needs the exit to "apply" the configuration.

    Also I added the command:

    "switchport trunk encap dot1q" on the trunk ports also.

    I also made sure the hosts had the correct default gateway, there dg should be the ip addreses as assigned on the router config.

    I hope this helps you out, if you want further help pm me on the forums and ill try and give you the latest config I used.

    Cheers.
    DevOps Engineer and Security Champion. https://blog.pash.by - I am trying to find my writing style, so please bear with me.
Sign In or Register to comment.