View | Details | Raw Unified | Return to bug 103151
Collapse All | Expand All

(-)chapter.sgml Tue Sep 12 00:09:55 2006 (-12 / +15 lines)
Lines 3410-3427 Link Here
3410
        configured using &man.ifconfig.8;.</para>
3410
        configured using &man.ifconfig.8;.</para>
3411
 
3411
 
3412
      <para>On the gateway machine on network #1 you would run the
3412
      <para>On the gateway machine on network #1 you would run the
3413
        following two commands to configure the tunnel.</para>
3413
        following commands to configure the tunnel.</para>
3414
 
3415
      <programlisting>ifconfig gif0 A.B.C.D W.X.Y.Z
3416
ifconfig gif0 inet 192.168.1.1 192.168.2.1 netmask 0xffffffff
3417
      </programlisting>
3418
 
3414
 
3415
      <screen>&prompt.root; <userinput>ifconfig <replaceable>gif0</replaceable> create</userinput>
3416
&prompt.root; <userinput>ifconfig tunnel <replaceable>gif0</replaceable> <replaceable>A.B.C.D</replaceable> <replaceable>W.X.Y.Z</replaceable></userinput>
3417
&prompt.root <userinput>ifconfig <replaceable>gif0</replaceable> inet <replaceable>192.168.1.1</replaceable> <replaceable>192.168.2.1</replaceable> netmask <replaceable>0xffffffff</replaceable></userinput>
3418
      </screen>
3419
3419
      <para>On the other gateway machine you run the same commands,
3420
      <para>On the other gateway machine you run the same commands,
3420
        but with the order of the IP addresses reversed.</para>
3421
        but with the order of the IP addresses reversed.</para>
3421
 
3422
 
3422
      <programlisting>ifconfig gif0 W.X.Y.Z A.B.C.D
3423
      <screen>&prompt.root; <userinput>ifconfig <replaceable>gif0</replaceable> create</userinput>
3423
ifconfig gif0 inet 192.168.2.1 192.168.1.1 netmask 0xffffffff
3424
&prompt.root; <userinput>ifconfig tunnel <replaceable>gif0</replaceable> <replaceable>W.X.Y.Z</replaceable> <replaceable>A.B.C.D</replaceable></userinput>
3424
      </programlisting>
3425
&prompt.root; <userinput>ifconfig <replaceable>gif0</replaceable> inet <replaceable>192.168.2.1</replaceable> <replaceable>192.168.1.1</replaceable> netmask <replaceable>0xffffffff</replaceable></userinput>
3426
      </screen>
3425
 
3427
 
3426
      <para>You can then run:</para>
3428
      <para>You can then run:</para>
3427
 
3429
 
Lines 3431-3439 Link Here
3431
        gateway, you would see this:</para>
3433
        gateway, you would see this:</para>
3432
 
3434
 
3433
      <screen>&prompt.root; <userinput>ifconfig gif0</userinput>
3435
      <screen>&prompt.root; <userinput>ifconfig gif0</userinput>
3434
gif0: flags=8011&lt;UP,POINTTOPOINT,MULTICAST&gt; mtu 1280
3436
gif0: flags=8051&lt;UP,POINTOPOINT,RUNNING,MULTICAST&gt; mtu 1280
3435
inet 192.168.1.1 --&gt; 192.168.2.1 netmask 0xffffffff
3437
        tunnel inet A.B.C.D --&gt; W.X.Y.Z
3436
physical address inet A.B.C.D --&gt; W.X.Y.Z
3438
        inet 192.168.1.1 --&gt; 192.168.2.1 netmask 0xffffffff
3437
      </screen>
3439
      </screen>
3438
 
3440
 
3439
      <para>As you can see, a tunnel has been created between the
3441
      <para>As you can see, a tunnel has been created between the
Lines 3553-3559 Link Here
3553
          <para>Edit <filename>/etc/rc.conf</filename> on gateway host
3555
          <para>Edit <filename>/etc/rc.conf</filename> on gateway host
3554
            #1 and add the following lines (replacing IP addresses as
3556
            #1 and add the following lines (replacing IP addresses as
3555
            necessary).</para>
3557
            necessary).</para>
3556
          <programlisting>gifconfig_gif0="A.B.C.D W.X.Y.Z"
3558
          <programlisting>gif_interfaces="gif0"
3559
gifconfig_gif0="A.B.C.D W.X.Y.Z"
3557
ifconfig_gif0="inet 192.168.1.1 192.168.2.1 netmask 0xffffffff"
3560
ifconfig_gif0="inet 192.168.1.1 192.168.2.1 netmask 0xffffffff"
3558
static_routes="vpn"
3561
static_routes="vpn"
3559
route_vpn="192.168.2.0 192.168.2.1 netmask 0xffffff00"
3562
route_vpn="192.168.2.0 192.168.2.1 netmask 0xffffff00"

Return to bug 103151