Live Chat & Podcast at 1:00PM Eastern on Sunday!
There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
Search
Linux and Unix
Tag Cloud
access acer asus bios bsod computer crash desktop driver drivers error ethernet excel freeze games gaming hard drive hardware hdmi internet laptop malware memory monitor motherboard netgear network printer problem ram random registry router slow software sound trojan ubuntu 11.10 uninstall usb video virus vista wifi windows windows 7 windows 7 32 bit windows 7 64 bit windows xp wireless
Search
Search for:
Tech Support Guy Forums > Operating Systems > Linux and Unix >
Solved: routing to a cidr network

Reply  
Thread Tools
c3v's Avatar
c3v c3v is offline
Junior Member with 7 posts.
 
Join Date: Feb 2006
Experience: Intermediate
28-Feb-2006, 12:39 PM #1
Solved: routing to a cidr network
Hello guys,

I have a debian server which i want to use to connect two networks

Network A: 192.168.1.0/24
Network B: 192.168.50.0/24 - actual

In between my two networks there is a service provider who is going to link them through a WIFI link + VPN.

On my debian i have two NICs

NIC A:
iface eth0 inet static
address 192.168.1.1
netmask 255.255.255.0
network 192.168.1.0


NIC B: - connected to the WIFI gateway
iface eth1 inet static
address 172.16.2.1
netmask 255.255.255.252
network 172.16.2.3
up ip route add 192.168.50.0/24 via 172.16.2.2
pre-down ip route del 192.168.50.0/24 via 172.16.2.2

On my second network the computers are using 192.168.50.20 as the gateway to get access to my first LAN - 192.168.1.0/24

Everything is working fine.. but i would like to use a cidr network on my second LAN since i have only 3 computers over there

therefore instead of using 192.168.50.0/24 i would like to use 192.168.50.50/29 giving me a posibility of having 6 IPs on my second LAN from 192.168.50.49 to 192.168.50.54. But the issue is i do not know how to make the routings...

ip route 192.168.50.50/29 via 172.16.2.2 is giving me RTNETLINK answers: Invalid argument

ip route 192.168.50.0/29 via 172.16.2.2 work fine.. but i will not be able to use 192.168.50.50 as my gateway on the second LAN.

Can someone help me?

Maybe i missed something
dpak's Avatar
Member with 37 posts.
 
Join Date: Jul 2005
Experience: This one time at band camp...
28-Feb-2006, 01:30 PM #2
Hmm... could be because you need to specify the network address for that IP block... so instead of:

ip route 192.168.50.50/29 via 172.16.2.2

Try:

ip route 192.168.50.48/29 via 172.16.2.2

The block you are trying to use is actually 192.168.50.49 -> 192.168.50.54, with a network address of 192.168.50.48 and a broadcast address of 192.168.50.55.

Hope that helps.
__________________
Keep the internet virus free and protect your computer by downloading free antivirus software for your home computer. Changing domains? Try Alter-Ego Profile Migration System.

- DPAK
c3v's Avatar
c3v c3v is offline
Junior Member with 7 posts.
 
Join Date: Feb 2006
Experience: Intermediate
28-Feb-2006, 03:10 PM #3
thanks.. ip route add 192.168.50.48/29 via 172.16.2.2 is correct since .48 is the network address
Reply

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.

Search Tech Support Guy

Find the solution to your
computer problem!




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who want to help you solve your computer problems. See our Welcome Guide to get started.
Thread Tools



Facebook Facebook Twitter Twitter TechGuy.tv TechGuy.tv Mobile TSG Mobile
You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 07:01 PM.
Copyright © 1996 - 2011 TechGuy, Inc. All rights reserved.

Powered by Cermak Technologies, Inc.