Date: Fri, 26 Jan 2001 19:27:24 +1000 From: "Doug Young" <dougy@bryden.apana.org.au> To: "Per Tore Larsen" <per.tore.larsen@fernonorden.com>, <freebsd-questions@FreeBSD.ORG> Subject: Re: Two IP addresses for one interface Message-ID: <009101c0877a$3df992e0$847e03cb@apana.org.au> References: <25879E6A7E74D411B9370050043B7F3E09F913@RUBICON>
next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format. ------=_NextPart_000_008C_01C087CE.0302C5E0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Thats what I've been trying ...... FreeBSD accepts that no problem, but = the=20 remote Win98 system complains that 255.255.255.255 is an illegal = netmask. The IPs aren't on same subnet though .... the initial one is a public = one with subnet 255.255.255.248 & the second is private (192.168.0.1).I've tried = various netmasks including 255.255.255.0 (FreeBSD complained that the remote=20 IP (192.168.0.2) was not in same subnet & 255.255.255.255 (Windows=20 complained about illegal netmask) ----- Original Message -----=20 From: Per Tore Larsen=20 To: 'Doug Young' ; freebsd-questions@FreeBSD.ORG=20 Sent: Friday, January 26, 2001 7:12 PM Subject: RE: Two IP addresses for one interface the second ip adress should be assign like below if the ip adress is on the same subnet you must use 255.255.255.255 as the netmask. if not use the appropriate netmask for the new ip address you are adding. ifconfig_xl0_alias0=3D"inet xxx.xxx.xxx.xxx netmask 255.255.255.255" ^^ ipadress PeTe -----Original Message----- From: Doug Young [mailto:dougy@bryden.apana.org.au] Sent: Friday, January 26, 2001 7:24 AM To: freebsd-questions@FreeBSD.ORG Subject: Two IP addresses for one interface Is there any reason why one interface should NOT have two IP = addresses ?? My reason is to do with testing NAT .... I've got a problem thats = been driving me to distraction for ages & because it involves one of two tun's it = costs a mint to keep=20 dialling the incoming line to test changes. If I can try things on a = regular ethernet=20 interface I might have a chance of seeing whats not right without = enriching Tel$tra \any further. I guess the second (private) address is assigned similarly to the = first (public) one in /etc/rc.conf ??=20 ------=_NextPart_000_008C_01C087CE.0302C5E0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=3DContent-Type content=3D"text/html; = charset=3Diso-8859-1"> <META content=3D"MSHTML 5.50.4134.600" name=3DGENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=3D#ffffff> <DIV><FONT face=3DArial size=3D2>Thats what I've been trying ...... = FreeBSD=20 accepts that no problem, </FONT><FONT face=3DArial size=3D2>but = </FONT><FONT=20 face=3DArial size=3D2>the </FONT></DIV> <DIV><FONT face=3DArial size=3D2>remote Win98 system complains that=20 255.255.255.255 is an illegal netmask.</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2>The IPs aren't on same subnet though = .... the=20 initial one is a public one with</FONT></DIV> <DIV><FONT face=3DArial size=3D2>subnet 255.255.255.248 & the second = is private=20 (192.168.0.1).I've tried various</FONT></DIV> <DIV><FONT face=3DArial size=3D2>netmasks including 255.255.255.0 = (FreeBSD=20 complained that the remote </FONT></DIV> <DIV><FONT face=3DArial size=3D2>IP (192.168.0.2) was not in same subnet = &=20 255.255.255.255 (Windows </FONT></DIV> <DIV><FONT face=3DArial size=3D2>complained about illegal = netmask)</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <BLOCKQUOTE dir=3Dltr=20 style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; = BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px"> <DIV style=3D"FONT: 10pt arial">----- Original Message ----- </DIV> <DIV=20 style=3D"BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: = black"><B>From:</B>=20 <A title=3Dper.tore.larsen@fernonorden.com=20 href=3D"mailto:per.tore.larsen@fernonorden.com">Per Tore Larsen</A> = </DIV> <DIV style=3D"FONT: 10pt arial"><B>To:</B> <A = title=3Ddougy@bryden.apana.org.au=20 href=3D"mailto:dougy@bryden.apana.org.au">'Doug Young'</A> ; <A=20 title=3Dfreebsd-questions@FreeBSD.ORG=20 = href=3D"mailto:freebsd-questions@FreeBSD.ORG">freebsd-questions@FreeBSD.O= RG</A>=20 </DIV> <DIV style=3D"FONT: 10pt arial"><B>Sent:</B> Friday, January 26, 2001 = 7:12=20 PM</DIV> <DIV style=3D"FONT: 10pt arial"><B>Subject:</B> RE: Two IP addresses = for one=20 interface</DIV> <DIV><BR></DIV> <DIV><SPAN class=3D218471309-26012001><FONT face=3DArial = color=3D#0000ff size=3D2>the=20 second ip adress should be assign like below</FONT></SPAN></DIV> <DIV><SPAN class=3D218471309-26012001><FONT face=3DArial = color=3D#0000ff size=3D2>if=20 the ip adress is on the same subnet you must use=20 255.255.255.255</FONT></SPAN></DIV> <DIV><SPAN class=3D218471309-26012001><FONT face=3DArial = color=3D#0000ff size=3D2>as=20 the netmask. if not use the appropriate netmask for the new=20 ip</FONT></SPAN></DIV> <DIV><SPAN class=3D218471309-26012001><FONT face=3DArial = color=3D#0000ff=20 size=3D2>address you are adding.</FONT></SPAN></DIV> <DIV><SPAN class=3D218471309-26012001><FONT face=3DArial = color=3D#0000ff=20 size=3D2></FONT></SPAN> </DIV> <DIV><SPAN class=3D218471309-26012001><FONT face=3DArial = color=3D#0000ff=20 size=3D2>ifconfig_xl0_alias0=3D"inet xxx.xxx.xxx.xxx netmask=20 255.255.255.255"</FONT></SPAN></DIV> <DIV><SPAN=20 = class=3D218471309-26012001> &nbs= p;  = ; = =20 <FONT face=3DArial color=3D#0000ff size=3D2>^^ = ipadress</FONT></SPAN></DIV> <DIV><SPAN class=3D218471309-26012001><FONT face=3DArial = color=3D#0000ff=20 size=3D2>PeTe</FONT></SPAN></DIV> <BLOCKQUOTE dir=3Dltr=20 style=3D"PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px = solid; MARGIN-RIGHT: 0px"> <DIV class=3DOutlookMessageHeader dir=3Dltr align=3Dleft><FONT = face=3DTahoma=20 size=3D2>-----Original Message-----<BR><B>From:</B> Doug Young=20 [mailto:dougy@bryden.apana.org.au]<BR><B>Sent:</B> Friday, January = 26, 2001=20 7:24 AM<BR><B>To:</B> = freebsd-questions@FreeBSD.ORG<BR><B>Subject:</B> Two=20 IP addresses for one interface<BR><BR></DIV></FONT> <DIV><FONT face=3DArial size=3D2>Is there any reason why one = interface should=20 NOT have two IP addresses ??</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2>My reason is to do with testing NAT = .... I've=20 got a problem thats been driving me</FONT></DIV> <DIV><FONT face=3DArial size=3D2>to distraction for ages & = because it=20 involves one of two tun's it costs a mint to keep </FONT></DIV> <DIV><FONT face=3DArial size=3D2>dialling the incoming line to test = changes. If=20 I can try things on a regular ethernet </FONT></DIV> <DIV><FONT face=3DArial size=3D2>interface I might have a chance of = seeing whats=20 not right without enriching Tel$tra \any further.</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2>I guess the second (private) = address is=20 assigned similarly to the first (public) one</FONT></DIV> <DIV><FONT face=3DArial size=3D2>in /etc/rc.conf=20 ?? </FONT></DIV></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML> ------=_NextPart_000_008C_01C087CE.0302C5E0-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?009101c0877a$3df992e0$847e03cb>