네트워크 리눅스 라우팅 테이블 설정 가르쳐주세요

런맨의 이미지

현재 세팅상태는 이렀습니다.

[root@wapp168 ~]# brctl show  
bridge name     bridge id               STP enabled     interfaces
br1             8000.0016177ebfa1       no              eth3
                                                        eth2
br              8000.0016177ebf9f       no              eth1
                                                        eth0
[root@wapp168 ~]# route -en   
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
192.168.100.0   192.168.100.1   255.255.255.0   UG        0 0          0 br1
192.168.100.0   0.0.0.0         255.255.255.0   U         0 0          0 br1
192.168.0.0     192.168.0.1     255.255.255.0   UG        0 0          0 br
192.168.0.0     0.0.0.0         255.255.255.0   U         0 0          0 br
[root@wapp168 ~]# ifconfig br
br        Link encap:Ethernet  HWaddr 00:16:17:7E:BF:9F  
          inet addr:192.168.0.168  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::216:17ff:fe7e:bf9f/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:240050 errors:0 dropped:0 overruns:0 frame:0
          TX packets:135129 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:41042412 (39.1 MiB)  TX bytes:34982599 (33.3 MiB)
 
[root@wapp168 ~]# ifconfig br1
br1       Link encap:Ethernet  HWaddr 00:16:17:7E:BF:A1  
          inet addr:192.168.100.168  Bcast:192.168.100.255  Mask:255.255.255.0
          inet6 addr: fe80::216:17ff:fe7e:bfa1/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:540 errors:0 dropped:0 overruns:0 frame:0
          TX packets:780 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:49347 (48.1 KiB)  TX bytes:377948 (369.0 KiB)
 
[root@wapp168 ~]# ping -I br1 192.168.0.1
PING 192.168.0.1 (192.168.0.1) from 192.168.100.168 br1: 56(84) bytes of data.
 
--- 192.168.0.1 ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 2008ms

제 짧은 생각은 마지막 핑 명령이 제대로 동작해야할거같은데...안되는 이유가 머죠
고수님의 답변을 기다리겠습니다.

제가 빠뜨리고 안올리 내용이있으면 알려주세요.... 될거같은데 안되는게 환장하겠습니다....초보 네트워커입니다.^^ㅎㅎ

김정균의 이미지

Default Gateway 가 2개라서 그러지 않을까 생각이 들기는 합니다. RHEL4 부터 Default Gateway 를 여러개 잡을 수 있을지 모르겠지만 (잡아본 적이 없어서..) 커널 2.4 배포본 까지만 해도 Default Gateway 를 1개 밖에 잡을 수 없었죠.

192.168.100.0   0.0.0.0         255.255.255.0   U         0 0          0 br1
192.168.0.0     0.0.0.0         255.255.255.0   U         0 0          0 br
0.0.0.0         192.168.0.1     0.0.0.0         UG        0 0          0 br

로 잡으면 되지 않을까 살짝 생각해 봅니다. 만약 특정 IP 에 대해서 br1 을 타야 한다면, iproute2 로 routing 을 잡아 주셔야 될 겁니다. 아마도..

그런데 lo device 설정이 잡혀 있지 않군요.

런맨의 이미지

김정균님이말씀해주신 설정대로 해봐도 핑은 안들어갔습니다.

우선
커널 라우팅 테이블은 위에줄 부터 비교한다고 하던데 맞나요?
그럼 default가 절대 2개 있을수 없을거 같은데...맞나요?
라우팅 테이블의 use if 라는 항목이 이 인터페이스를 이용하여 패킷이 나간다는 건가요?
아니면 이 인터페이스에서 생성된 패킷은 이 라우팅 테이블을 적용 받는다는 말인가요?

그래서 제가 안되는 이유로 생각하는 것이
패킷이 br1에서 생성되었는데 라우팅 테이블을 보면 목적지가 192.168.0.0이기 때문에 br인터페이스를 사용한다고
되었는데
여기서 br1에서 생성된 패킷이 br로 못넣어가기 때문에 패킷이 사라지는게 아닌가 추측해봅니다.

그러면 김정균님이 말씀하신 iproute2같은 프로그램을 설치하여서 라우팅을 해주어야하는건가요?
커널 라우팅 테이블에서 소스를 보고 라우팅이 가능하게 패치는 불가능한거요?

제말이 맞는지 좀 알려주시면 감사겠습니다. 이해되시나요?
ㅜㅜ제가 말주변이 없어서 제가 말하면 다른사람을이 잘 못 알아 듣더라고요.ㅜㅜ

인생은 도박이다.

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.