Find the answer to your Linux question:
Results 1 to 7 of 7
I am new in linux plz help me to resolve this problem. I have a switch and three pc's connected to it.pc1 has an ip address 192.168.30.1 pc2 has an ...
  1. #1
    Just Joined!
    Join Date
    Aug 2008
    Posts
    14

    problem with routing

    I am new in linux plz help me to resolve this problem.
    I have a switch and three pc's connected to it.pc1 has an ip address 192.168.30.1 pc2 has an ip address 192.168.30.2 and pc3 has ip address 192.168.60.2.when i ping 192.168.30.1 from 30.2 it works fine when i ping 192.168.60.2 it does not work.what is the procedure that i can communicate 60.0 subnet to 30.0 subnet.
    Thanks in advance

  2. #2
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,281
    Not possible with a switch you need a router if you want to use different networks.

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

  3. #3
    Linux Guru
    Join Date
    Nov 2007
    Posts
    1,695
    A) Change your netmask. A network definition is *incomplete* without the netmask, which defines its size. Obviously, it sounds like your current netmask includes the 30.X IP's but not the 60.X IP address.

    B) If your switch is "manageable" and supports VLAN's, you can create VLAN's that the switch will move packets between.

    C) If you cannot do A) or B), then one of the machines will have to be configured to act as a router to pass packets between multiple networks.

  4. #4
    Just Joined!
    Join Date
    Oct 2005
    Posts
    38
    This is not really a linux question as it is a routing problem. The problem is the network ID's are different. 192.168.30.x and 192.168.60.x are different.

    Like HRO said you can either set up the ports your pcs are on for vlans and allow the vlan ID's to pass packets between, or add another switch and allow traffic from one switch to the next, or maybe if one of your pcs had two nics you can set up routing on the pc to pass packets, bypassing the need for a second switch.

  5. #5
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,281
    Switches do not pass traffic from one VLAN to a different VLAN. For traffic to pass from one VLAN to another it must pass through a router. Only the router can make this happen. There are switches that can act as a router, but you cannot have a switch do the VLAN routing without the router.

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

  6. #6
    Linux Guru
    Join Date
    Nov 2007
    Posts
    1,695
    Cisco 4500 Series Switch Config Guide

    Overview of Layer 3 Interfaces

    The Catalyst 4500 series switch supports Layer 3 interfaces with the Cisco IOS IP and IP routing protocols. Layer 3, the network layer, is primarily responsible for the routing of data in packets across logical internetwork paths.

    ...

    Logical Layer 3 VLAN Interfaces

    The logical Layer 3 VLAN interfaces provide logical routing interfaces to VLANs on Layer 2 switches. A traditional network requires a physical interface from a router to a switch to perform inter-VLAN routing. The Catalyst 4500 series switch supports inter-VLAN routing by integrating the routing and bridging functions on a single Catalyst 4500 series switch.
    While Cisco is of course precise in noting that a virtual layer 3 interface is being created to handle inter-VLAN routing, there are lower-tier switches that only have a web management GUI with a checkbox like "enable packet forwarding between VLAN's." This is layer 3 functionality being included in a "switch" and the point is that the OP's switch may have this option without adding any further hardware - thus the "Option B" mentioned above.

  7. #7
    Just Joined!
    Join Date
    Aug 2008
    Posts
    14
    Thnx for your advices.
    But actually mistake is mine ...the question should be like this.....how to route packets between 30.x and 60.x with netmask /24.or how can i make a linux machine as a router.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...