27,28c27,28 < < --- > > 178,262d177 <

< 5.Configure installation networking

< <

The new -r11+ boot CDs allow you to configure a working network, allowing you to use ssh, scp or wget < as needed before even beginning the installation process. Even if you don't need to do these things now, < you should go ahead and set up networking now. Once set up, Portage will be able to use your configured network < once you are inside the chroot environment (required for installing Gentoo Linux).

<

DHCP 

<

< Network configuration is simple with DHCP; If your ISP is not using < DHCP, skip down to the static configuration section below. <

< < < <

< Code listing 4: Network configuration with DHCP

< # dhcpcd eth0 
< 
<

< Note: < Some ISPs require you to provide a hostname. To do that, < add a -h myhostname flag to the dhcpcd command line above. <

<

If you receive dhcpConfig warnings, don't panic; the errors < are most likely cosmetic. Skip down to Network testing below.

<

Static configuration 

<

< We need to setup just enough networking so that we can download < sources for the system build, as well as the required localhost interface. Type in the following commands, replacing < $IFACE with your network interface (typically eth0), $IPNUM < with your IP address, $BCAST with your broadcast address, and $NMASK < with your network mask. For the route command, replace < $GTWAY with your default gateway. <

< < < <

< Code listing 5

< # /sbin/ifconfig $IFACE $IPNUM broadcast $BCAST netmask $NMASK
< # /sbin/route add -net default gw $GTWAY netmask 0.0.0.0 metric 1
< 
<

Now, it's time to create the /etc/resolv.conf < file so that name resolution (finding Web/FTP sites by name, rather than just by IP address) will work.

< <

< Note: At the moment the only editor installed by default is nano, a < small and very easy-to-use visual editor. Use nano with the -w < option to turn off automatic line-wrapping. <

< <

Here's a template to follow for creating your /etc/resolv.conf file: <

< < < <

< Code listing 6: /etc/resolv.conf template

< domain mydomain.com
< nameserver 10.0.0.1
< nameserver 10.0.0.2
< 
<

Replace 10.0.0.1 and 10.0.0.2 with the IP addresses of your < primary and secondary DNS servers respectively.

<

Network testing 

<

Now that your network has been configured, the /sbin/ifconfig -a command should show (hopefully!) < that your network card is working < (look for UP and RUNNING in the output). <

< < < <

< Code listing 7: /sbin/ifconfig for a working network card

< eth0      Link encap:Ethernet  HWaddr 00:50:BA:8F:61:7A
<           inet addr:192.168.0.2  Bcast:192.168.0.255  Mask:255.255.255.0
<           inet6 addr: fe80::50:ba8f:617a/10 Scope:Link
<           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
<           RX packets:1498792 errors:0 dropped:0 overruns:0 frame:0
<           TX packets:1284980 errors:0 dropped:0 overruns:0 carrier:0
<           collisions:1984 txqueuelen:100
<           RX bytes:485691215 (463.1 Mb)  TX bytes:123951388 (118.2 Mb)
<           Interrupt:11
< 
268c183 < 6.Set up partitions

--- > 5.Set up partitions

402a318,404 > >

> 6.Configure installation networking

> >

The new -r11+ boot CDs allow you to configure a working network, allowing you to use ssh, scp or wget > as needed before even beginning the installation process. Even if you don't need to do these things now, > you should go ahead and set up networking now. Once set up, Portage will be able to use your configured network > once you are inside the chroot environment (required for installing Gentoo Linux).

>

DHCP 

>

> Network configuration is simple with DHCP; If your ISP is not using > DHCP, skip down to the static configuration section below. >

> > > >

> Code listing 4: Network configuration with DHCP

> # dhcpcd eth0 
> 
>

> Note: > Some ISPs require you to provide a hostname. To do that, > add a -h myhostname flag to the dhcpcd command line above. >

>

If you receive dhcpConfig warnings, don't panic; the errors > are most likely cosmetic. Skip down to Network testing below.

>

Static configuration 

>

> We need to setup just enough networking so that we can download > sources for the system build, as well as the required localhost interface. Type in the following commands, replacing > $IFACE with your network interface (typically eth0), $IPNUM > with your IP address, $BCAST with your broadcast address, and $NMASK > with your network mask. For the route command, replace > $GTWAY with your default gateway. >

> > > >

> Code listing 5

> # /sbin/ifconfig $IFACE $IPNUM broadcast $BCAST netmask $NMASK
> # /sbin/route add -net default gw $GTWAY netmask 0.0.0.0 metric 1
> 
>

Now, it's time to create the /etc/resolv.conf > file so that name resolution (finding Web/FTP sites by name, rather than just by IP address) will work.

> >

> Note: At the moment the only editor installed by default is nano, a > small and very easy-to-use visual editor. Use nano with the -w > option to turn off automatic line-wrapping. >

> >

Here's a template to follow for creating your /etc/resolv.conf file: >

> > > >

> Code listing 6: /etc/resolv.conf template

> domain mydomain.com
> nameserver 10.0.0.1
> nameserver 10.0.0.2
> 
>

Replace 10.0.0.1 and 10.0.0.2 with the IP addresses of your > primary and secondary DNS servers respectively.

>

Network testing 

>

Now that your network has been configured, the /sbin/ifconfig -a command should show (hopefully!) > that your network card is working > (look for UP and RUNNING in the output). >

> > > >

> Code listing 7: /sbin/ifconfig for a working network card

> eth0      Link encap:Ethernet  HWaddr 00:50:BA:8F:61:7A
>           inet addr:192.168.0.2  Bcast:192.168.0.255  Mask:255.255.255.0
>           inet6 addr: fe80::50:ba8f:617a/10 Scope:Link
>           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
>           RX packets:1498792 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:1284980 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:1984 txqueuelen:100
>           RX bytes:485691215 (463.1 Mb)  TX bytes:123951388 (118.2 Mb)
>           Interrupt:11
> 
>