LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 07-03-2008, 08:42 AM   #1
bangla
LQ Newbie
 
Registered: Jul 2008
Posts: 3

Rep: Reputation: 0
VLAN trunking between Cisco 2950 and linux box[Fedora 9]


Hello,

I'm having trouble to configure these two. Let me know if there are any online resources, though I've tried.

Cisco 2950 is a 24 port switch.
I'd like make port 2 for trunking of vlan 2 and 5.
Here vlan 2 will have port 3, 4 and
vlan 5 will have port 5, 6, 7, 8.

Code:
interface FastEthernet0/2
 switchport access vlan 2
 switchport trunk native vlan 2
 switchport trunk allowed vlan 2-10
 switchport mode trunk
 no ip address
interface FastEthernet0/3
 switchport access vlan 2
 switchport mode access
 no ip address
!
interface FastEthernet0/4
 switchport access vlan 2
 switchport mode access
 no ip address
!

interface FastEthernet0/5
 switchport access vlan 5
 switchport mode access
 no ip address
!
interface FastEthernet0/6
 switchport access vlan 5
 switchport mode access
 no ip address
!
interface FastEthernet0/7
 switchport access vlan 5
 switchport mode access
 no ip address
!
interface FastEthernet0/8
 switchport access vlan 5
 switchport mode access
 no ip address
!

interface Vlan1
 no ip address
 no ip route-cache
 shutdown
!
interface Vlan2
 ip address 10.0.0.34 255.255.255.224
 no ip route-cache
!
interface Vlan5
 ip address 10.0.0.130 255.255.255.224
 no ip route-cache
 shutdown
!
I've added two vlan at eth1 of my linux box using following commands:
vconfig add eth1 2
vconfig add eth1 5

Code:
eth1.2    Link encap:Ethernet  HWaddr 00:E0:4C:56:29:9D  
          inet addr:10.0.0.33  Bcast:10.0.0.63  Mask:255.255.255.224

eth1.5    Link encap:Ethernet  HWaddr 00:E0:4C:56:29:9D  
          inet addr:10.0.0.129  Bcast:10.0.0.159  Mask:255.255.255.224
Now, from a host 10.0.0.35/27 connected to cisco2950 port 3, I can ping 10.0.0.34 but cannot reach 10.0.0.33 and

From linuxbox 10.0.0.33/27 I can't ping 10.0.0.34 or 10.0.0.35.
Interesting things is that I can see the packets trying from 10.0.0.35 using
tcpdump -i eth1


Little help will be highly appreciated.

Thanks.
 
Old 07-03-2008, 09:39 AM   #2
grejon04
Member
 
Registered: Jun 2008
Posts: 43

Rep: Reputation: 15
what are the ip ranges for the vlans?

I'm not drawing a good picture of your network from your description...what is 10.0.0.34, 35, more info please?
 
Old 07-04-2008, 02:11 PM   #3
bangla
LQ Newbie
 
Registered: Jul 2008
Posts: 3

Original Poster
Rep: Reputation: 0
I'd like to setup the following networks,
10.0.0.32/27 via lan 2,
10.0.0.128/27 via lan 5,

10.0.0.33 is the address of linux box vlan 2 interface,
10.0.0.34 is the address of cisco vlan 2,
10.0.0.35 is the address of a host connected to port 3 of cisco.

Let me know if I'm missing anything.

Thanks for your response.

Last edited by bangla; 07-04-2008 at 02:13 PM.
 
Old 07-06-2008, 11:12 AM   #4
grejon04
Member
 
Registered: Jun 2008
Posts: 43

Rep: Reputation: 15
Sorry for the slow response.

I'm not real familiar with subinterfaces for Linux NICs, but I did a little reading here and I think that trunking the vlans may be hindering what you're trying to do. Try this: leave the NIC as is, but turn the cisco port (2, I think) to an access port, and ping. Do this for both the vlans (let me know if you need help with the commands). If you are able to ping, then trunking is your problem.

I think that what you may need to do is route the packets to your NIC instead of trunking them, but I'm not 100% on that either.
 
Old 07-06-2008, 01:18 PM   #5
bmarx
Member
 
Registered: Dec 2004
Distribution: Slackware, Arch, FreeBSD
Posts: 202

Rep: Reputation: 34
Your fastethernet0/2 port looks kind of strange to me. You seem to be setting it up as an access port and a trunk port:

interface FastEthernet0/2
switchport access vlan 2 // Operate as a static member of this vlan
switchport trunk native vlan 2
switchport trunk allowed vlan 2-10 // 2,5 might be better
switchport mode trunk // Force operation as a trunk
no ip address

I do not know what the outcome of this will be.

Also, you do not define the encapsulation type for the trunk, and cisco will favor their proprietary isl over the standards based dot1q, although my cisco book says that the catalyst 2950 does not support isl, but explicitly setting the encapsulation type might be a good idea.

Can you give some debugging info from some of the network devices? i.e.:

from the cisco device:
show vlan
show vlan id 2
show int fa0/2 trunk

from the linux device:
some of the data from
cat /proc/net/vlan/*

and to communicate between the 2 vlans, you will need routing statements such as:

ip route 10.0.0.32 255.255.255.224 vlan2
ip route 10.0.0.128 255.255.255.224 vlan5
 
Old 07-06-2008, 03:04 PM   #6
scowles
Member
 
Registered: Sep 2004
Location: Texas, USA
Distribution: Fedora
Posts: 620

Rep: Reputation: 31
As bmarx pointed out, the configuration of your trunked port looks strange. Plus, you are configuring vlan 2 as native, but yet you are configuring the linux side to expect vlan 2 tagged packets. In cisco IOS, a native vlan is transmitted un-tagged across the trunk. This would probably explain why you are not able to ping its IP address.

I would suggest changing the trunked port configuration to...
Code:
interface FastEthernet0/2
 switchport trunk encapsulation dot1q
 switchport mode trunk
..and try your test again.

BTW: Did you notice vlan 5 is shutdown?

Also, I went through this type of setup awhile back in a lab environment. Checkout: this LQ link
 
Old 07-06-2008, 03:54 PM   #7
bangla
LQ Newbie
 
Registered: Jul 2008
Posts: 3

Original Poster
Rep: Reputation: 0
Wow, Thanks to all of you. Happy to have lots of response. Though I've gone through a lot of pain.

I've found the missing point, "switchport nonegotiate" for the trunk port.



Just to inform, the 2950 does not accept
#neeswitchport trunk encapsulation dot1q
as it has only dot1q and forced.

switchport access vlan 2
trunk port working with the above conf. I've configures it as this port can also work as access port.

switchport trunk allowed vlan 2-10 // 2,5 might be better
2-10 also works perfectly.

I'll check the following entry though the packets are crossing through trunk port with existing conf:
p route 10.0.0.32 255.255.255.224 vlan2
ip route 10.0.0.128 255.255.255.224 vlan5


Thanks again.
 
  


Reply

Tags
cisco, trunking, vconfig, vlan


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
VLAN Tagging and Cisco 2924XL EN questions metallica1973 Linux - Networking 4 01-29-2008 12:08 PM
How can I page the output of the show tech command on my cisco 2950? abefroman Linux - Networking 1 12-17-2007 06:59 PM
Cisco 2950 Error: POST Failure: Ethernet Controller Test: Failed abefroman Linux - Networking 1 11-30-2007 03:14 AM
Cisco 2950 Series switch with no ios or permisions drgnlegend3 General 1 02-13-2007 10:01 AM
Linux and Cisco switch 2950 foysol_bgd Linux - Newbie 6 02-07-2007 07:19 PM


All times are GMT -5. The time now is 09:58 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration