[완료] 두개의 랜카드와의 통신

julggol의 이미지

ip aliasing 를 사용하여 eth0에 두개의
아이피를 할당하니 모두 잘 되더군요...
답글 달아 주시고 관심 가져 주셔서 감사합니다.
수고하세요....

---------------------------------------------------------------
안녕하세요? 제가 하려고 하는 작업이 가능한지 여쭈어 보고 싶습니다.
리눅스 서버에 2개의 랜카드가 설치되어 있고 리눅스 서버를 통해 인터넷을
공유하여 사용하고 있습니다.

구성은 아래와 같습니다.
eth0 -> 192.168.0.1, subnet : 255.255.255.0, g/w : 192.168.0.1
eth1 -> 192.168.10.21, subnet : 255.255.255.0, g/w : 192.168.10.1

이와 같은 구성에서 eth0, eth1 케이블을 모두 제거하고 eth1 과 노트북
을 크로스 케이블로 연결하여 특정 프로그램을 이용하여 eth1 의 아이피 주소를
변경하려고 하는 겁니다.

route 는 아래와 같습니다.

Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
192.168.10.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
default 192.168.10.1 0.0.0.0 UG 0 0 0 eth1

노트북에서 DHCPC 를 이용하여 아이피 주소를 리눅스 서버로부터 할당
받을 수 있는지 불가능하다면 노트북의 아이피 주소는 어떻게 설정을 해야지만 리눅스 서버와
TCP 통신을 할 수 있는지 개념이 잡히지 않습니다.

조언좀 부탁드립니다.

감사합니다.

hansolo의 이미지

그니까, 서버와 노트북간에 크로스케이블로 연결해서 접속하고 싶다.. 이 질문이시죠?

그냥 서버 및 노트북 모두 같은 서브넷에 속한 IP처럼 고정IP로 잡으시면 연결될텐데요..

즉, 서버의 eth1 을 10.10.10.1 , 노트북은 10.10.10.2 로 잡으시고

노트북에서 ssh 10.10.10.1 등으로 접속하시면 안되나요??

monovision의 이미지

크로스 케이블로 연결하고 IP 를 같은 서브넷으로 묶어주면 가능합니다.

즉, 위의 설정대로라면

리눅스 : eth1 -> 192.168.10.21, subnet : 255.255.255.0, g/w : 192.168.10.1

이라면 노트북은 eth1 과 크로스 케이블로 연결하고 동일한 서브넷의 ip 주소(ex.192.168.10.22) 로 잡아주시고 subnet, g/w 는 동일하게 설정하면 됩니다.

가끔씩 멍청하게도 위와같이 설정해도 안되는 경우가 있긴 합니다.

그럴때는 아래의 예와 같이 gateway 를 상대방 IP 주소로 잡아주면 됩니다.

리눅스 : eth1 -> 192.168.10.2, subnet : 255.255.255.0, g/w : 192.168.10.3
노트북 : eth0 -> 192.168.10.3, subnet : 255.255.255.0, g/w : 192.168.10.2

댓글 달기

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