| 1 | <?xml version='1.0' encoding='UTF-8'?> |
1 | <?xml version='1.0' encoding='UTF-8'?> |
| 2 | <!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> |
2 | <!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> |
| 3 | <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/home-router-howto.xml,v 1.37 2005/12/05 13:34:49 neysx Exp $ --> |
3 | <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/home-router-howto.xml,v 1.38 2005/12/12 04:36:21 vapier Exp $ --> |
| 4 | |
4 | |
| 5 | <guide link="/doc/en/home-router-howto.xml" lang="en"> |
5 | <guide link="/doc/en/home-router-howto.xml" lang="en"> |
| 6 | <title>Home Router Guide</title> |
6 | <title>Home Router Guide</title> |
| 7 | |
7 | |
| 8 | <author title="Author"> |
8 | <author title="Author"> |
| … | |
… | |
| 15 | </abstract> |
15 | </abstract> |
| 16 | |
16 | |
| 17 | <!-- The content of this document is released into the public domain --> |
17 | <!-- The content of this document is released into the public domain --> |
| 18 | <license/> |
18 | <license/> |
| 19 | |
19 | |
| 20 | <version>1.22</version> |
20 | <version>1.23</version> |
| 21 | <date>2005-11-04</date> |
21 | <date>2005-12-11</date> |
| 22 | |
22 | |
| 23 | <chapter> |
23 | <chapter> |
| 24 | <title>Introduction</title> |
24 | <title>Introduction</title> |
| 25 | <section> |
25 | <section> |
| 26 | <body> |
26 | <body> |
| … | |
… | |
| 865 | This is the minimal setup required to replace the dnsmasq DHCP functionality |
865 | This is the minimal setup required to replace the dnsmasq DHCP functionality |
| 866 | that we used earlier. Speaking of which, you did remember to disable the DHCP |
866 | that we used earlier. Speaking of which, you did remember to disable the DHCP |
| 867 | features in dnsmasq didn't you? If not, you should do so now (just comment |
867 | features in dnsmasq didn't you? If not, you should do so now (just comment |
| 868 | out the <c>dhcp-range</c> setting in <path>/etc/dnsmasq.conf</path> and restart |
868 | out the <c>dhcp-range</c> setting in <path>/etc/dnsmasq.conf</path> and restart |
| 869 | the service). |
869 | the service). |
|
|
870 | </p> |
|
|
871 | |
|
|
872 | </body> |
|
|
873 | </section> |
|
|
874 | |
|
|
875 | <section> |
|
|
876 | <title>Connect Another LAN (or two or three or ...)</title> |
|
|
877 | <body> |
|
|
878 | |
|
|
879 | <p> |
|
|
880 | Sometimes you have need of connecting the router to another LAN. Maybe you |
|
|
881 | want to hook up a group of friends temporarily, or you're a neat freak and |
|
|
882 | want to section off different groups of computers, or you're just really |
|
|
883 | really bored. Whatever the reasons, extending the router to other LAN |
|
|
884 | networks should be pretty straightforward. In the following examples, I will |
|
|
885 | assume that this new network is connected via a third ethernet card, namely |
|
|
886 | <c>eth2</c>. |
|
|
887 | </p> |
|
|
888 | |
|
|
889 | <p> |
|
|
890 | First you need to configure the interface. Just take the instructions in the |
|
|
891 | <uri link="#doc_chap4_pre1">4.1 code listing</uri> and replace <c>eth0</c> |
|
|
892 | with <c>eth2</c> and <c>192.168.0</c> with <c>192.168.1</c>. |
|
|
893 | </p> |
|
|
894 | |
|
|
895 | <p> |
|
|
896 | Then you need to tweak dnsmasq to service the new interface. Just edit the |
|
|
897 | <path>/etc/conf.d/dnsmasq</path> file again and append <c>-i eth2</c> to |
|
|
898 | DNSMASQ_OPTS; using -i multiple times is OK. Then edit |
|
|
899 | <path>/etc/dnsmasq.conf</path> and add another line like the dhcp-range line |
|
|
900 | in the <uri link="#doc_chap5_pre1">5.1 code listing</uri>, replacing |
|
|
901 | <c>192.168.0</c> with <c>192.168.1</c>. Having multiple dhcp-range lines is |
|
|
902 | OK too. |
|
|
903 | </p> |
|
|
904 | |
|
|
905 | <p> |
|
|
906 | Finally, see the rules in the <uri link="#doc_chap5_pre2">5.2 code |
|
|
907 | listing</uri> and duplicate the rules that have <c>-i ${LAN}</c> in them. You |
|
|
908 | may want to create another variable, say <c>LAN2</c>, to make things easier. |
| 870 | </p> |
909 | </p> |
| 871 | |
910 | |
| 872 | </body> |
911 | </body> |
| 873 | </section> |
912 | </section> |
| 874 | |
913 | |