Thank you I will try all this , i appreciate you taking the time to
answer.

On 10 Jun 2002 12:07:20 +0400
"Vladimir B. "Grebenschikov <[EMAIL PROTECTED]> wrote:

> ÷ Fri, 07.06.2002, × 19:27, Christophe Prevotaux ÎÁÐÉÓÁÌ:
> > try to setup this (it won't work) your example does not work
> 
> As I already said you need to remove interface route here
> (or apply changes sugessted by Iasen Kostoff <[EMAIL PROTECTED]>)
> 
> > ifconfig fxp0 inet 192.168.1.1/24 up
> > ifconfig fxp0 inet 192.168.1.1/32 alias 
> route delete 192.168.1.1
> > ifconfig fxp0 inet 192.168.1.1/32 alias <--- here it will not work
> > anymore
> 
> 
> With route line it will work
> 
> > this is the same thing with vlan interfaces under FreeBSD
> > you can't have more than 1 interface with the same IP/NETMASK
> > 
> > ifconfig fxp0 inet 192.168.1.1/24 up
> > ifconfig create vlan0 inet vlan 1 vlandev fxp0 192.168.1.1/32 up
> route delete 192.168.1.1
> > ifconfig create vlan1 inet vlan 2 vlandev fxp0 192.168.1.1/32 up <--
> > this does not work
> 
> before each new vlan initialization you need remove interface route 
> 
> > let's say for the example sake , that you want only to have 1 vlan
> > on the fxp0 then you can setup the interface as shown above but you
> > can't route anything thru it
> > 
> > route add 192.168.1.2 -interface vlan0 
> > 
> > will not route properly the packets thru vlan0 either because it is
> > a /32 (AFAIK)
> 
> It is not valid command, see:
> 
> # route add 1.2.3.4 -interface fxp0
> add host 1.2.3.4: gateway fxp0
> # netstat -rn | fgrep 1.2.3.4
> 1.2.3.4            00:00:00:00:00:00  UHLS        0        0   fxp0
> #
> It is invalid route, -interface command add route direct reachable via
> interface (ppp interface for example) but there we have ethernet with
> indirect access (you need mac-resolve first)
> 
> see:
> 
> #  route add -net 1.2.3.4/32 -cloning -iface fxp0
> add net 1.2.3.4: gateway fxp0
> # netstat -rn | fgrep 1.2.3.4
> 1.2.3.4/32         link#3             UCS         0        0   fxp0
> #
> 
> So, it is net-route and it will be cloned at request (arp-request will
> be sent)
> 
> # ping -c1 1.2.3.4
> PING 1.2.3.4 (1.2.3.4): 56 data bytes
> 64 bytes from 1.2.3.4: icmp_seq=0 ttl=64 time=1.799 ms
> --- 1.2.3.4 ping statistics ---
> 1 packets transmitted, 1 packets received, 0% packet loss
> round-trip min/avg/max/stddev = 1.799/1.799/1.799/0.000 ms
> # netstat -rn | fgrep 1.2.3.4
> 1.2.3.4            00:01:03:d6:9e:9f  UHLW        0        2   fxp0  
> 1192 =>
> 1.2.3.4/32         link#3             UCS         1        0   fxp0
> #
> 
> you see at this stage you have cloning(C) netroute and cloned(W)
> hostroute to your NIC with 1.2.3.4
> 
> If you do not want arp-resolve you can specify MAC-address (link-layer
> address):
> 
> # route add -host 4.3.2.1 -link aa:bb:cc:dd:ee:ff -ifp fxp0
> add host 4.3.2.1: gateway aa:bb:cc:dd:ee:ff
> # netstat -rn | fgrep 4.3.2.1
> 4.3.2.1            aa:bb.cc.dd.ee.ff  UGHS        0        0   fxp0
> #
> 
> Ruslan Ermilov <[EMAIL PROTECTED]> knows more about routes setup and may
> be correct me if I am mistaken.
> 
> > and even if you could do it , then the problem is that you are
> > limited to having only one vlan per interface, which sucks BIG TIME.
> 
> No, see above
> 
> > under Linux you can have the equivalent of the following setup:
> > 
> > 192.168.1.2/24
> > 192.168.1.3/24
> > 192.168.1.4/24
> > 
> > are machines behind the switch vlan 1 2 3 ports respectively
> > 
> > ifconfig fxp0 inet 192.168.1.1/24 up
> > ifconfig create vlan0 inet vlan 1 vlandev fxp0 192.168.1.1/24 up
> > ifconfig create vlan1 inet vlan 2 vlandev fxp0 192.168.1.1/24 up
> > ifconfig create vlan2 inet vlan 3 vlandev fxp0 192.168.1.1/24 up
> > 
> > etc... etc...
> > 
> > and then you do the equivalent of 
> > 
> > route add 192.168.1.2 -interface vlan0 
> > route add 192.168.1.3 -interface vlan1 
> > route add 192.168.1.4 -interface vlan2 
> 
> As I said -interface flag is invalid here, Linux or too smart or too
> stupid here.
> 
> > and it works just fine, with no problems whatsoever.
> > 
> > What I want to do is just this but under FreeBSD.
> > 
> > My question is : How can I do it ? 
> 
> See above
>  
> PS: 
>   As I already said, route manpage need some work, because it is very
> unclean, may be somebody who knows English well will do it ...

--
===============================================================
Christophe Prevotaux      Email: [EMAIL PROTECTED]
HEXANET SARL                URL: http://www.hexanet.fr/
Z.A.C Les Charmilles        Tel: +33 (0)3 26 79 30 05 
3 Allée Thierry Sabine   Direct: +33 (0)3 26 61 77 72 
BP202                       Fax: +33 (0)3 26 79 30 06
51686 Reims Cedex 2                                
FRANCE                   HEXANET Network Operation Center             
===============================================================

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-net" in the body of the message

Reply via email to