Networking Forums

Networking Forums > Computer Networking > Linux Networking > How to access local machine using ethernet interface, not loopback?

Reply
Thread Tools Display Modes

How to access local machine using ethernet interface, not loopback?

 
 
Anthony
Guest
Posts: n/a

 
      11-20-2003, 04:03 AM
I am running a simulation (using TCP/IP) that requires the traffic to
go through a 'real' network connection. I have only one computer with
an ethernet card, so everything have to occur locally. Is it possible
to force the traffic to go through eth0 (to eth0:1)? I've tried to
bring down lo and set up the network as follows:

Network interfaces -
eth0 IP address: 192.168.0.1
eth0:1 IP address: 192.168.0.2

Routing -
For host 192.168.0.2, use eth0
For host 192.168.0.1, use eth0:1

(Because I want the traffic to go from 192.168.0.1 to 192.168.0.2 and
vice versa)

The result is that when I ping either IP address, 100% loss occur. If
lo is up, the traffic goes through lo (by checking the RX and TX
fields in ifconfig).

Am I missing something? Or is this mission impossible?

If this is impossible, will it be OK if I plug 1 more network card and
connect them using a crossover cable, so that I have 2 seperate
network interfaces?
 
Reply With Quote
 
 
 
 
Floyd Davidson
Guest
Posts: n/a

 
      11-20-2003, 06:04 AM
(E-Mail Removed) (Anthony) wrote:
>I am running a simulation (using TCP/IP) that requires the traffic to
>go through a 'real' network connection. I have only one computer with
>an ethernet card, so everything have to occur locally. Is it possible
>to force the traffic to go through eth0 (to eth0:1)? I've tried to
>bring down lo and set up the network as follows:


[snip]

I don't know what difference it can make going through a "real"
network connection as opposed to the lo device???

But one other option is to use a "dummy" device. It isn't a
real hardware connection, but it will get you away from
the lo device.

--
Floyd L. Davidson <http://web.newsguy.com/floyd_davidson>
Ukpeagvik (Barrow, Alaska) (E-Mail Removed)
 
Reply With Quote
 
Jean-Luc BEAUDET
Guest
Posts: n/a

 
      11-20-2003, 09:27 AM
Well, why don't you get simple to start ?


Sure you could find some Network Card Adaptor for about 15$...

And the trick is done.

:-)

Floyd Davidson wrote:

>(E-Mail Removed) (Anthony) wrote:
>
>>I am running a simulation (using TCP/IP) that requires the traffic to
>>go through a 'real' network connection. I have only one computer with
>>an ethernet card, so everything have to occur locally. Is it possible
>>to force the traffic to go through eth0 (to eth0:1)? I've tried to
>>bring down lo and set up the network as follows:
>>

>
> [snip]
>
>I don't know what difference it can make going through a "real"
>network connection as opposed to the lo device???
>
>But one other option is to use a "dummy" device. It isn't a
>real hardware connection, but it will get you away from
>the lo device.
>



 
Reply With Quote
 
Anthony
Guest
Posts: n/a

 
      11-21-2003, 02:37 AM
What is a Network Card Adaptor?

Do you mean buying one more NIC and connecting the 2 cards using a
crossover cable? Or you mean something else?

Thanks very much anyway.

Jean-Luc BEAUDET <(E-Mail Removed)> wrote in message news:<(E-Mail Removed)>...
> Well, why don't you get simple to start ?
>
>
> Sure you could find some Network Card Adaptor for about 15$...
>
> And the trick is done.
>
> :-)
>
>

 
Reply With Quote
 
Tauno Voipio
Guest
Posts: n/a

 
      11-21-2003, 01:53 PM

"Anthony" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) om...
> What is a Network Card Adaptor?
>
> Do you mean buying one more NIC and connecting the 2 cards using a
> crossover cable? Or you mean something else?
>


That will not work - the IP stack is smart enough to route packets to *any*
of the local IP addresses via the loopback interface, lo.

Are you simply not happy with lo, or are you trying to prove that the NIC
hardware works, or something else?

The book

Alessandro Rubini & Jonathan Corbet, Linux Device Drivers, O'Reilly, ISBN
0-59600-008-1

contains a pair of dummy network drivers playing the loopback game without
getting out of the host.

IMHO, you need another computer to test traffic out of the NIC.

HTH

Tauno Voipio
tauno voipio @ iki fi

PS. For the book, see <http://www.xml.com/ldd/chapter/book/>.

TV


 
Reply With Quote
 
Anthony
Guest
Posts: n/a

 
      11-22-2003, 12:57 AM
I see. Thanks very much to every one responded to the question

"Tauno Voipio" <(E-Mail Removed)_REMOVE.invalid> wrote in message news:<AFpvb.289$(E-Mail Removed)>...
> "Anthony" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed) om...
> > What is a Network Card Adaptor?
> >
> > Do you mean buying one more NIC and connecting the 2 cards using a
> > crossover cable? Or you mean something else?
> >

>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: problem with ethernet loopback test using loopback plug/stub: receiving socket not seeing packet. Rick Jones Linux Networking 10 08-22-2010 07:17 PM
loopback interface mbm Linux Networking 0 02-06-2008 09:21 AM
Howto redirect traffic from local machine to internet back to local machine? Martin Kahlert Linux Networking 0 11-25-2005 07:40 AM
Windows 98 machine won't access Internet or local shared devices on startup Ture Magnusson Wireless Networks 1 06-21-2005 10:03 AM
route issue? machine is accessible but cannot access outside local network Eric Smith Linux Networking 1 09-09-2003 03:57 PM



1 2 3 4 5 6 7 8 9 10 11