route add default via 급질문ㅠ

Fedora의 이미지

http://debianusers.org/jsboard/read.php?table=qna&no=31332&page=1

위에 글처럼 게이트웨이를 여러개 사용하기 위해서 ip route를 할려고 했습니다.

eth 0 : IP : 125.141.91.194

Gateway : 125.141.91.254

eth 1 IP : 61.75.27.200

Gateway : 61.75.27.254

#echo 200 eth0 >> /etc/iproute2/rt_tables
#ip rule add fwmark 1 table eth0
#ip route add default via 125.141.91.254 table eth0
#iptables -A OUTPUT -t mangle -s 125.141.91.194 -j MARK --set-mark 1

위에 명령어 처럼 해봤는데 성공했습니다. 잘 되더군요.

#echo 200 eth1 >> /etc/iproute2/rt_tables
#ip rule add fwmark 1 table eth1
#ip route add default via 61.75.27.254 table eth1 <= 3번째 줄
#iptables -A OUTPUT -t mangle -s 61.75.27.200 -j MARK --set-mark 1

그런데 이렇게 테이블을 하나 더추가하니 3번째 줄에서 오류가 나네요

root@localhost ~]#ip route add default via 61.75.27.254 table eth1

RENETLINK answers : File exists

root@localhost ~]

문제는 처음에 테이블을 만들경우는 잘되는데

두번째부터 ip route add default via 에서 오류가 납니다.

어떻게 해결해야 될까요?(__)

esrevinu의 이미지

이런 게 있는 줄 몰랐는데 오늘 이걸 써야 할 일이 생겼습니다.
한 컴퓨터에 랜카드 두개를 달아서 서로 다른 망을 연결했더니
ssh 접속이 안 되더군요.
질문하신 분 스크립트랑, http://kldp.org/node/25115#comment-60096 을 보고
개념을 조금 이해하겠네요.
질문하신 분의 에러가 나는 이유는 eth1 이라는 table에 eth0 table과 똑같은 200이라는 번호를 주어서 에러가 나는 듯 합니다. 아마도 번호로 table을 구분하는 것 같은데
같은 table에 default gateway를 두개를 주니까 그 부분에서 에러가 나는 것 같습니다.

전 랜카드가 두개이기 때문에 하나는 기존의 routing table을 이용하고
다른 하나만 iproute2 table을 만들어서 하니까 되네요.
물론 두개 다 만들어 routing 하는 것도 해 봤는데 잘 되는 군요.

오늘 이것때문에 삽질로 하루 그냥 보내네요.
오래된 질문이지만 재밌는 거 알게 돼서 답글 남깁니다.
검색해 보니까 제가 질문하신 분의 비슷한 질문에 엉뚱한 답을 남겼었군요. ㅎㅎ

댓글 달기

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
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.