linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* How to configure an ethernet dev as PtP ?
@ 2003-04-15  8:21 Stephan von Krawczynski
  2003-04-15 12:10 ` Richard B. Johnson
  2003-04-15 14:50 ` Chris Friesen
  0 siblings, 2 replies; 4+ messages in thread
From: Stephan von Krawczynski @ 2003-04-15  8:21 UTC (permalink / raw)
  To: linux-kernel

Hello all,

I tried to configure an ethernet device as a pointopoint link recently, just to
find out that this does not work as one would expect via:

ifconfig eth0 192.168.1.1 pointopoint 192.168.5.1 up

I tried on kernel 2.4.21-pre6 and 2.2.19 (just to name two), both the same. It
comes up as:

eth0      Link encap:Ethernet  HWaddr 00:04:76:F7:E9:17  
          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST MULTICAST  MTU:1500  Metric:1

I do not understand why this does not work out just like another ptp-interface
like isdn:

isdn0     Link encap:Ethernet  HWaddr FC:FC:00:00:00:00  
          inet addr:192.168.1.1  P-t-P:192.168.5.1  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP  MTU:1500  Metric:1

Is there anything I mis-understood or a good reason for not being able to make
eth pointopoint?

I have the feeling this question is pretty brain-dead, but anyway, maybe some
kind soul can drop a few words ...
-- 
Regards,
Stephan

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: How to configure an ethernet dev as PtP ?
  2003-04-15  8:21 How to configure an ethernet dev as PtP ? Stephan von Krawczynski
@ 2003-04-15 12:10 ` Richard B. Johnson
  2003-04-15 13:12   ` Stephan von Krawczynski
  2003-04-15 14:50 ` Chris Friesen
  1 sibling, 1 reply; 4+ messages in thread
From: Richard B. Johnson @ 2003-04-15 12:10 UTC (permalink / raw)
  To: Stephan von Krawczynski; +Cc: linux-kernel

On Tue, 15 Apr 2003, Stephan von Krawczynski wrote:

> Hello all,
>
> I tried to configure an ethernet device as a pointopoint link recently, just to
> find out that this does not work as one would expect via:
>
> ifconfig eth0 192.168.1.1 pointopoint 192.168.5.1 up
>
> I tried on kernel 2.4.21-pre6 and 2.2.19 (just to name two), both the same. It
> comes up as:
>
> eth0      Link encap:Ethernet  HWaddr 00:04:76:F7:E9:17
>           inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
>           UP BROADCAST MULTICAST  MTU:1500  Metric:1
>
> I do not understand why this does not work out just like another ptp-interface
> like isdn:
>
> isdn0     Link encap:Ethernet  HWaddr FC:FC:00:00:00:00
>           inet addr:192.168.1.1  P-t-P:192.168.5.1  Mask:255.255.255.255
>           UP POINTOPOINT RUNNING NOARP  MTU:1500  Metric:1
>
> Is there anything I mis-understood or a good reason for not being able to make
> eth pointopoint?
>
> I have the feeling this question is pretty brain-dead, but anyway, maybe some
> kind soul can drop a few words ...
> --
> Regards,
> Stephan

Because ethernet is not a point-to-point interface. At the hardware
level, ethernet talks from one hardware address to another hardware
address, i.e., the IEEE station address. You need ARP to find out
what that address is so you can't "get there from here." But, you
can do essentially the same thing, you set up a host route on
that interface.

Use a 'private' network address...

On one host:

ifconfig eth1 10.0.0.1 netmask 255.255.255.0 broadcast 10.0.0.255
route add -host my-router-ip-address dev eth1

On the other host:
ifconfig eth1 10.0.0.2 netmask 255.255.255.0 broadcast 10.0.0.255
route add -host my-client-ip-address dev eth1



Cheers,
Dick Johnson
Penguin : Linux version 2.4.20 on an i686 machine (797.90 BogoMips).
Why is the government concerned about the lunatic fringe? Think about it.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: How to configure an ethernet dev as PtP ?
  2003-04-15 12:10 ` Richard B. Johnson
@ 2003-04-15 13:12   ` Stephan von Krawczynski
  0 siblings, 0 replies; 4+ messages in thread
From: Stephan von Krawczynski @ 2003-04-15 13:12 UTC (permalink / raw)
  To: root; +Cc: linux-kernel

On Tue, 15 Apr 2003 08:10:59 -0400 (EDT)
"Richard B. Johnson" <root@chaos.analogic.com> wrote:

> On Tue, 15 Apr 2003, Stephan von Krawczynski wrote:
> 
> > Hello all,
> >
> > I tried to configure an ethernet device as a pointopoint link recently,
> > just to find out that this does not work as one would expect via:
> >
> > ifconfig eth0 192.168.1.1 pointopoint 192.168.5.1 up
> >
> > I tried on kernel 2.4.21-pre6 and 2.2.19 (just to name two), both the same.
> > It comes up as:
> >
> > eth0      Link encap:Ethernet  HWaddr 00:04:76:F7:E9:17
> >           inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
> >           UP BROADCAST MULTICAST  MTU:1500  Metric:1
> >
> > I do not understand why this does not work out just like another
> > ptp-interface like isdn:
> >
> > isdn0     Link encap:Ethernet  HWaddr FC:FC:00:00:00:00
> >           inet addr:192.168.1.1  P-t-P:192.168.5.1  Mask:255.255.255.255
> >           UP POINTOPOINT RUNNING NOARP  MTU:1500  Metric:1
> >
> > Is there anything I mis-understood or a good reason for not being able to
> > make eth pointopoint?
> >
> > I have the feeling this question is pretty brain-dead, but anyway, maybe
> > some kind soul can drop a few words ...
> > --
> > Regards,
> > Stephan
> 
> Because ethernet is not a point-to-point interface. At the hardware
> level, ethernet talks from one hardware address to another hardware
> address, i.e., the IEEE station address. You need ARP to find out
> what that address is so you can't "get there from here." But, you
> can do essentially the same thing, you set up a host route on
> that interface.

Well, the world today really knows ptp-type ethernet-interfaces in WAN
environment, this is where the question comes from. Think of simply a two-ended
bridged WAN connection. It is in fact (like) ptp.

> Use a 'private' network address...

That is only a _good_ alternative on first sight, but thinking again about it
you might as well say that in a rather big-sized WAN environment with lots of
hosts involved that route all kinds of private ips it is a really nice idea to
connect the interconnecting wan-boxes with ptp _not_ burning down additional
(private) subnets without real need. (remember, if you have lots of wan
connections you need lots of private subnets, but if you could use ptp you need
_none_)

-- 
Regards,
Stephan

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: How to configure an ethernet dev as PtP ?
  2003-04-15  8:21 How to configure an ethernet dev as PtP ? Stephan von Krawczynski
  2003-04-15 12:10 ` Richard B. Johnson
@ 2003-04-15 14:50 ` Chris Friesen
  1 sibling, 0 replies; 4+ messages in thread
From: Chris Friesen @ 2003-04-15 14:50 UTC (permalink / raw)
  To: Stephan von Krawczynski; +Cc: linux-kernel

Stephan von Krawczynski wrote:
> Hello all,
> 
> I tried to configure an ethernet device as a pointopoint link recently, just to
> find out that this does not work as one would expect via:
> 
> ifconfig eth0 192.168.1.1 pointopoint 192.168.5.1 up

How about:

/sbin/ip ad ad 192.168.1.1 peer 192.168.5.1 dev eth0

this gives:

# /sbin/ip ad
1: lo: <LOOPBACK,UP> mtu 16436 qdisc noqueue
     link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
     inet 127.0.0.1/8 brd 127.255.255.255 scope host lo
2: eth0: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 100
     link/ether 00:06:5b:a2:b3:8a brd ff:ff:ff:ff:ff:ff
     inet 192.168.1.1 peer 192.168.5.1/32 scope global eth0

Does that do what you want?


Chris

-- 
Chris Friesen                    | MailStop: 043/33/F10
Nortel Networks                  | work: (613) 765-0557
3500 Carling Avenue              | fax:  (613) 765-2986
Nepean, ON K2H 8E9 Canada        | email: cfriesen@nortelnetworks.com


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-04-15 14:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-04-15  8:21 How to configure an ethernet dev as PtP ? Stephan von Krawczynski
2003-04-15 12:10 ` Richard B. Johnson
2003-04-15 13:12   ` Stephan von Krawczynski
2003-04-15 14:50 ` Chris Friesen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).