LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 06-01-2006, 01:53 PM   #1
vishamr2000
Member
 
Registered: Aug 2004
Posts: 210

Rep: Reputation: 31
Not understanding network setup!!


Hi to all,

Code:
                 +-------+   eth1   +-------+
                 |       |==========|       |
 'network 1' ----|   A   |          |   B   |---- 'network 2'
                 |       |==========|       |
                 +-------+   eth2   +-------+

A and B are routers

# tc qdisc add dev eth1 root teql0
# tc qdisc add dev eth2 root teql0
# ip link set dev teql0 up

On router A: 

# ip addr add dev eth1 10.0.0.0/31
# ip addr add dev eth2 10.0.0.2/31
# ip addr add dev teql0 10.0.0.4/31

On router B: 

# ip addr add dev eth1 10.0.0.1/31
# ip addr add dev eth2 10.0.0.3/31
# ip addr add dev teql0 10.0.0.5/31
The above has been quoted from LARTC HOWTO. I would like to know the following things:

1) Are the 10.0.0.0/31, 10.0.0.2/31, 10.0.0.3/31...different networks? Are the devices eth1, eth2 and teql0 on each router part of 3 different networks?

2) What is the reason for doing the "/31" thing? CAn't we use network addresses such as 192.168.0.0/24, 192.168.10.0/24 and so on for the devices eth1, eth2 and teql0?

Warm regards,
Visham

Last edited by vishamr2000; 06-01-2006 at 01:58 PM.
 
Old 06-01-2006, 03:38 PM   #2
iuaui
Member
 
Registered: Sep 2005
Location: Nummela, Southern Finland
Distribution: Fedora Core 4, Fedora Core 5, Redhat 9.0, Solaris 10, WInXP pro, W2k pro
Posts: 30

Rep: Reputation: 15
The reason doing that "/31" thing is to preserve IP addresses. But this mask gives only two IP addresses/network, so those networks have only network address and broadcast address. (This means that IP-spaces' first address is used as network address and last address is for broadcast. You can calculate it from bits left for "host" portion, meaning 32-31 = 1 bit ==> there is 2 addresses, first and last) Those network masks do not give any IP's for hosts.

My humble opinion is that /30 mask should be use for this kind of "networks". (32-30 = 2 bits which means four addresses, two for hosts and two for network and broadcast addresses)

This way using small address spaces also makes sure that ALL IP-ranges in 10.0.0.0 space are two adresses wide. Summa summarum: You have a enormous pile of small networks and you can't extend network space. All this kind of network "splitting" should be done from the tail, not from the head...
 
  


Reply



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
Manual Network Setup Works, /etc/network/interfaces doesn't verdeboy2k Linux - Wireless Networking 0 05-31-2006 06:56 PM
help with understanding /ect/init.d/network script LDZ420 Linux - Newbie 2 05-19-2006 04:07 PM
Can't setup network with rtl8150 usb network adapter IvanJ Linux - Networking 1 12-27-2005 12:16 AM
Setting a home network, need a little understanding.. araldit Linux - Networking 2 01-31-2005 10:53 AM
Newbie wanna setup up a linux network on existing home network... marvc Linux - Networking 3 03-19-2003 09:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:47 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration